aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2016-04-26 13:13:59 +0100
committerRon Yorston <rmy@pobox.com>2016-04-26 13:48:18 +0100
commitaa3595b3d38ecc6b86b351ac215829f0de58d911 (patch)
tree2f78acabf0a2babca275f0ef4d32ad9cd1968b43 /editors
parentfd476d8629d489245e18ec278d3c846ab1359eec (diff)
downloadbusybox-w32-ansi.tar.gz
busybox-w32-ansi.tar.bz2
busybox-w32-ansi.zip
winansi: add a routine to clear the screen bufferansi
And use it to restore the old behaviour of vi and less: they reset the cursor to the top of the buffer and clear it.
Diffstat (limited to '')
-rw-r--r--editors/vi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/editors/vi.c b/editors/vi.c
index b2d185193..75ce8d396 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -3074,7 +3074,12 @@ static void go_bottom_and_clear_to_eol(void)
3074//----- Erase from cursor to end of screen ----------------------- 3074//----- Erase from cursor to end of screen -----------------------
3075static void clear_to_eos(void) 3075static void clear_to_eos(void)
3076{ 3076{
3077#if !ENABLE_PLATFORM_MINGW32
3077 write1(ESC_CLEAR2EOS); 3078 write1(ESC_CLEAR2EOS);
3079#else
3080 /* in practice clear_to_eos() always clears the entire screen */
3081 reset_screen();
3082#endif
3078} 3083}
3079 3084
3080//----- Start standout mode ------------------------------------ 3085//----- Start standout mode ------------------------------------