From 9a7f488564610817a7b9d9d44d7db154e444eb7d Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 25 Apr 2016 14:48:10 +0100 Subject: winansi: fix a couple of small problems Clear the last line; move to cursor position before clearing screen with ^L. --- win32/winansi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/winansi.c b/win32/winansi.c index d9e0835ce..78d5d5f5c 100644 --- a/win32/winansi.c +++ b/win32/winansi.c @@ -124,7 +124,8 @@ static void erase_till_end_of_screen(void) &dummy); pos.X = 0; - for (pos.Y = sbi.dwCursorPosition.Y+1; pos.Y < sbi.srWindow.Bottom; pos.Y++) { + for (pos.Y = sbi.dwCursorPosition.Y+1; pos.Y <= sbi.srWindow.Bottom; + pos.Y++) { FillConsoleOutputCharacterA(console, ' ', sbi.dwSize.X, pos, &dummy); FillConsoleOutputAttribute(console, plain_attr, sbi.dwSize.X, -- cgit v1.2.3-55-g6feb