From: Eli Zaretskii Date: Tue, 31 Jan 2023 16:03:28 +0000 (+0200) Subject: Fix cursor-in-echo-area on TTY frames X-Git-Tag: emacs-29.0.90~552 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=49b61405582edaa1cda05ea37b056d46b423271b;p=emacs.git 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) --- 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)) {