Skip to content

Commit

Permalink
fix: show multiple cursors at the correct x pos with tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Jan 6, 2025
1 parent 790aaaf commit 900ea1e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Line.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ void Line_display(Object* cast, RichString* str) {
}
if (buffer->cursors[i].y == y) {
int cx = buffer->cursors[i].x;
attrs[cx] = CRT_colors[AlertColor];
if (cx == UTF8_chars(out)) {
int px = Line_widthUntil(this, cx, buffer->tabSize);

attrs[px] = CRT_colors[AlertColor];
if (px == UTF8_chars(out)) {
out[outIdx++] = ' ';
out[outIdx] = '\0';
}
Expand Down

0 comments on commit 900ea1e

Please sign in to comment.