From c290e585180b300bed7206cd012665cd82b6dd2c Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sun, 20 Aug 2023 11:18:44 +1000 Subject: [PATCH] lib-renderline; fix double-cursors in display-x11 When a line wraps, display-x11 is showing cursor at end of one line and start of next. Fix that. Signed-off-by: NeilBrown --- lib-renderline.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib-renderline.c b/lib-renderline.c index fc93a441..02543f05 100644 --- a/lib-renderline.c +++ b/lib-renderline.c @@ -452,6 +452,8 @@ static inline void do_draw(struct pane *p safe, tmp = str[len]; str[len] = 0; + if (offset >= len) + offset = -1; home_call(focus, "Draw:text", p, offset, NULL, str, rd->scale, NULL, ri->attr, x, y); str[len] = tmp; -- 2.39.5