From 228e08259b7c2bb666c2dc0fdd09d9a82a105eb9 Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Fri, 2 Jan 2026 03:31:21 -0500 Subject: don't highlight trailing whitespace in front of the cursor --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 1576c65..4e31e6f 100644 --- a/main.c +++ b/main.c @@ -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); -- cgit v1.2.3