From d2391e78f82d0f3712e5a8fabd1ce9a4d3081f06 Mon Sep 17 00:00:00 2001 From: Dan Haffey Date: Mon, 7 Dec 2015 20:48:39 -0800 Subject: [PATCH] Restore terminal line length and cursor position on refresh. This keeps printfs from blowing away the line state (M-m M-m won't erase your prompt). --- vere/term.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vere/term.c b/vere/term.c index 3f34314622..a88b68700f 100644 --- a/vere/term.c +++ b/vere/term.c @@ -591,9 +591,11 @@ static void _term_it_refresh_line(u3_utty* uty_u) { c3_w len_w = uty_u->tat_u.mir.len_w; + c3_w cus_w = uty_u->tat_u.mir.cus_w; _term_it_show_clear(uty_u); - _term_it_show_wide(uty_u, len_w, uty_u->tat_u.mir.lin_w); + _term_it_show_line(uty_u, uty_u->tat_u.mir.lin_w, len_w); + _term_it_show_cursor(uty_u, cus_w); } /* _term_it_show_more(): new current line.