Skip to content

Commit 900ea1e

Browse files
committed
fix: show multiple cursors at the correct x pos with tabs
1 parent 790aaaf commit 900ea1e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Line.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,10 @@ void Line_display(Object* cast, RichString* str) {
169169
}
170170
if (buffer->cursors[i].y == y) {
171171
int cx = buffer->cursors[i].x;
172-
attrs[cx] = CRT_colors[AlertColor];
173-
if (cx == UTF8_chars(out)) {
172+
int px = Line_widthUntil(this, cx, buffer->tabSize);
173+
174+
attrs[px] = CRT_colors[AlertColor];
175+
if (px == UTF8_chars(out)) {
174176
out[outIdx++] = ' ';
175177
out[outIdx] = '\0';
176178
}

0 commit comments

Comments
 (0)