From 2f98e6e37b5870a644a178d4d6998c6c7f1f68dd Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Sun, 3 Jul 2005 17:09:22 +0000 Subject: [PATCH] Fix the original cause of the "arrow keys don't work on screen" bug. * src/term.c (tty_set_terminal_modes, tty_reset_terminal_modes): Flush tty output before returning. * src/sysdep.c (reset_sys_modes): Remove superflous fflush call. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-370 --- src/sysdep.c | 2 +- src/term.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sysdep.c b/src/sysdep.c index 56dae99dc9f..52f2855d336 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1922,7 +1922,7 @@ reset_sys_modes (tty_out) #endif tty_reset_terminal_modes (tty_out->display); - fflush (tty_out->output); + #ifdef BSD_SYSTEM #ifndef BSD4_1 /* Avoid possible loss of output when changing terminal modes. */ diff --git a/src/term.c b/src/term.c index 8f541816798..1d165d36aca 100644 --- a/src/term.c +++ b/src/term.c @@ -249,6 +249,7 @@ tty_set_terminal_modes (struct display *display) OUTPUT_IF (tty, tty->TS_cursor_visible); OUTPUT_IF (tty, tty->TS_keypad_mode); losecursor (tty); + fflush (tty->output); } } @@ -270,6 +271,7 @@ tty_reset_terminal_modes (struct display *display) /* Output raw CR so kernel can track the cursor hpos. */ current_tty = tty; cmputc ('\r'); + fflush (tty->output); } } -- 2.39.2