aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-04-07 14:38:41 +0100
committerRon Yorston <rmy@pobox.com>2019-04-07 14:38:41 +0100
commita5f8e300121686dba0ddcf2d7a3b3c432fbb0422 (patch)
tree3fb388b882c3b6e717653981226b9a318f17a4fa
parenta33e3cb8e19b71ccf30f3dc4131eb0ba32b6d735 (diff)
downloadbusybox-w32-a5f8e300121686dba0ddcf2d7a3b3c432fbb0422.tar.gz
busybox-w32-a5f8e300121686dba0ddcf2d7a3b3c432fbb0422.tar.bz2
busybox-w32-a5f8e300121686dba0ddcf2d7a3b3c432fbb0422.zip
less: use alternate screen buffer
-rw-r--r--miscutils/less.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index ad23b7d0d..a5ce14c91 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -338,7 +338,11 @@ static void less_exit(int code)
338 set_tty_cooked(); 338 set_tty_cooked();
339 if (!(G.kbd_fd_orig_flags & O_NONBLOCK)) 339 if (!(G.kbd_fd_orig_flags & O_NONBLOCK))
340 ndelay_off(kbd_fd); 340 ndelay_off(kbd_fd);
341#if !ENABLE_PLATFORM_MINGW32
341 clear_line(); 342 clear_line();
343#else
344 printf(ESC"[?1049l");
345#endif
342 if (code < 0) 346 if (code < 0)
343 kill_myself_with_sig(- code); /* does not return */ 347 kill_myself_with_sig(- code); /* does not return */
344 exit(code); 348 exit(code);
@@ -1120,7 +1124,7 @@ static void reinitialize(void)
1120 printf(ESC"[999;999H" ESC"[6n"); 1124 printf(ESC"[999;999H" ESC"[6n");
1121#endif 1125#endif
1122#if ENABLE_PLATFORM_MINGW32 1126#if ENABLE_PLATFORM_MINGW32
1123 reset_screen(); 1127 printf(ESC"[?1049h");
1124#endif 1128#endif
1125 buffer_fill_and_print(); 1129 buffer_fill_and_print();
1126} 1130}