From aa3595b3d38ecc6b86b351ac215829f0de58d911 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 26 Apr 2016 13:13:59 +0100 Subject: winansi: add a routine to clear the screen buffer 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. --- editors/vi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'editors') 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) //----- Erase from cursor to end of screen ----------------------- static void clear_to_eos(void) { +#if !ENABLE_PLATFORM_MINGW32 write1(ESC_CLEAR2EOS); +#else + /* in practice clear_to_eos() always clears the entire screen */ + reset_screen(); +#endif } //----- Start standout mode ------------------------------------ -- cgit v1.2.3-55-g6feb