aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-07-03 17:09:22 +0000
committerKaroly Lorentey2005-07-03 17:09:22 +0000
commit2f98e6e37b5870a644a178d4d6998c6c7f1f68dd (patch)
tree521afcd955de41a5665ab149a54ddf1ef046c1c1 /src
parenta1e76a629b601f19d7dc0acc28679355eaa1800b (diff)
downloademacs-2f98e6e37b5870a644a178d4d6998c6c7f1f68dd.tar.gz
emacs-2f98e6e37b5870a644a178d4d6998c6c7f1f68dd.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/sysdep.c2
-rw-r--r--src/term.c2
2 files changed, 3 insertions, 1 deletions
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)
1922#endif 1922#endif
1923 1923
1924 tty_reset_terminal_modes (tty_out->display); 1924 tty_reset_terminal_modes (tty_out->display);
1925 fflush (tty_out->output); 1925
1926#ifdef BSD_SYSTEM 1926#ifdef BSD_SYSTEM
1927#ifndef BSD4_1 1927#ifndef BSD4_1
1928 /* Avoid possible loss of output when changing terminal modes. */ 1928 /* 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)
249 OUTPUT_IF (tty, tty->TS_cursor_visible); 249 OUTPUT_IF (tty, tty->TS_cursor_visible);
250 OUTPUT_IF (tty, tty->TS_keypad_mode); 250 OUTPUT_IF (tty, tty->TS_keypad_mode);
251 losecursor (tty); 251 losecursor (tty);
252 fflush (tty->output);
252 } 253 }
253} 254}
254 255
@@ -270,6 +271,7 @@ tty_reset_terminal_modes (struct display *display)
270 /* Output raw CR so kernel can track the cursor hpos. */ 271 /* Output raw CR so kernel can track the cursor hpos. */
271 current_tty = tty; 272 current_tty = tty;
272 cmputc ('\r'); 273 cmputc ('\r');
274 fflush (tty->output);
273 } 275 }
274} 276}
275 277