From 49b61405582edaa1cda05ea37b056d46b423271b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 31 Jan 2023 18:03:28 +0200 Subject: [PATCH] Fix cursor-in-echo-area on TTY frames * src/dispnew.c (update_frame_1): Fix off-by-one error when positioning the cursor in the echo-area. (Bug#61184) --- src/dispnew.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dispnew.c b/src/dispnew.c index a0a37acb804..87ec83acdf3 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5009,6 +5009,10 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p, } while (row > top && col == 0); + /* We exit the loop with COL at the glyph _after_ the last one. */ + if (col > 0) + col--; + /* Make sure COL is not out of range. */ if (col >= FRAME_CURSOR_X_LIMIT (f)) { -- 2.39.2