diff options
| author | WormHeamer | 2026-01-02 03:31:21 -0500 |
|---|---|---|
| committer | WormHeamer | 2026-01-02 03:31:21 -0500 |
| commit | 228e08259b7c2bb666c2dc0fdd09d9a82a105eb9 (patch) | |
| tree | cae157afa414273738639370e4a41669818a714c | |
| parent | edfd74e9688eaaf75dac601961c1d4164bf022c9 (diff) | |
don't highlight trailing whitespace in front of the cursor
| -rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -565,7 +565,8 @@ void draw_buf(EditBuf *eb) { x = lmarg; y++; } else if (c == '\n' || c == '\t' || c == ' ') { - VuiAttr a = txt_chr(start) == '\n' ? trailsp : txt; + int trail = txt_chr(start) == '\n' && !(l.p == start.p && l.i == start.i); + VuiAttr a = trail ? trailsp : txt; if (c == '\t') { u32 n = 1 + (-(x+1) & 7); while (n--) vui_chra(x++, y, ' ', a); |
