rendered cursor moves the right amount of cells

master
Alessandro Mauri 5 years ago
parent 091a63a679
commit b4f6124da0
  1. 8
      src/ste.c

@ -493,7 +493,13 @@ void curUpdateRender ()
/* continue (skip increment) if you encounter a continuation char */ /* continue (skip increment) if you encounter a continuation char */
if (isCont(c)) continue; if (isCont(c)) continue;
else if (isStart(c)) t.cur.r_x++; else if (isStart(c)) {
wchar_t tc;
mbtowc(&tc,
&rows.rw[t.cur.y].chars[i],
rows.rw[t.cur.y].size - i);
t.cur.r_x += wcwidth(tc) - 1;
}
if (c == '\t') t.cur.r_x += (TABSIZE - 1); if (c == '\t') t.cur.r_x += (TABSIZE - 1);

Loading…
Cancel
Save