From 6032a3e83129a086629b96e67459083a223a1e03 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 4 Jun 2014 13:54:58 +0300 Subject: [PATCH] Fix infloop of -nw session at exit on MS-Windows under a debugger. src/sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter contains garbage on WINDOWSNT (which could potentially infloop at exit). --- src/ChangeLog | 4 ++++ src/sysdep.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 16e3328a735..c6a68f5b90c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2014-06-04 Eli Zaretskii + * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter + contains garbage on WINDOWSNT (which could potentially infloop at + exit). + Minimize cursor motion during TTY menu updates. * term.c (tty_menu_display): Don't position cursor here. Instead, pass the cursor coordinates to update_frame_with_menu. diff --git a/src/sysdep.c b/src/sysdep.c index 4e86dc903dc..e1fd86f5f3b 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1245,7 +1245,7 @@ reset_sys_modes (struct tty_display_info *tty_out) int i; tty_turn_off_insert (tty_out); - for (i = curX (tty_out); i < FrameCols (tty_out) - 1; i++) + for (i = cursorX (tty_out); i < FrameCols (tty_out) - 1; i++) { fputc (' ', tty_out->output); } -- 2.39.5