summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
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);