aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-04-07 14:34:33 +0100
committerRon Yorston <rmy@pobox.com>2019-04-07 14:34:33 +0100
commita33e3cb8e19b71ccf30f3dc4131eb0ba32b6d735 (patch)
treeed7cf5fd08f858ddd46b32f2b9b604d20e98c4d8 /editors/vi.c
parent96ac4dc17b53f5bec3c4dd31b9b9a3c3e5fe3582 (diff)
downloadbusybox-w32-a33e3cb8e19b71ccf30f3dc4131eb0ba32b6d735.tar.gz
busybox-w32-a33e3cb8e19b71ccf30f3dc4131eb0ba32b6d735.tar.bz2
busybox-w32-a33e3cb8e19b71ccf30f3dc4131eb0ba32b6d735.zip
vi: use alternate screen buffer
Implement the "ESC[?1049h" and "ESC[?1049l" ANSI escape sequences to switch between the alternate and normal screen buffers. This allows vi to restore the original screen contents on exit.
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 91a3e0ac1..a8b4dc5a4 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -1020,12 +1020,7 @@ static void refresh(int full_screen)
1020static void redraw(int full_screen) 1020static void redraw(int full_screen)
1021{ 1021{
1022 // cursor to top,left; clear to the end of screen 1022 // cursor to top,left; clear to the end of screen
1023#if !ENABLE_PLATFORM_MINGW32
1024 write1(ESC_SET_CURSOR_TOPLEFT ESC_CLEAR2EOS); 1023 write1(ESC_SET_CURSOR_TOPLEFT ESC_CLEAR2EOS);
1025#else
1026 write1(ESC_SET_CURSOR_TOPLEFT);
1027 reset_screen();
1028#endif
1029 screen_erase(); // erase the internal screen buffer 1024 screen_erase(); // erase the internal screen buffer
1030 last_status_cksum = 0; // force status update 1025 last_status_cksum = 0; // force status update
1031 refresh(full_screen); // this will redraw the entire display 1026 refresh(full_screen); // this will redraw the entire display