From: NeilBrown Date: Sun, 20 Aug 2023 01:18:44 +0000 (+1000) Subject: lib-renderline; fix double-cursors in display-x11 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=c290e585180b300bed7206cd012665cd82b6dd2c;p=edlib.git 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 --- 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;