mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-18 23:12:15 +08:00
Fix console clear screen in case of partial scrolling
Commit d7586cb incorrectly checked only for the new cursor position beyond the old cursor position to decide if we have to correct for user scrolling. Since this situation is handled just fine if the cursor is still visible, only perform the subsequent correction if the cursor is not in the visible console window. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
11dcf9cb5c
commit
05847ad6e9
@ -1288,8 +1288,8 @@ fhandler_console::clear_screen (cltype xc1, cltype yc1, cltype xc2, cltype yc2)
|
||||
|
||||
/* Make correction for the following situation: The console buffer
|
||||
is only partially used and the user scrolled down into the as yet
|
||||
unused area. */
|
||||
if (oldEndY < con.dwEnd.Y)
|
||||
unused area so far that the cursor is outside the window buffer. */
|
||||
if (oldEndY < con.dwEnd.Y && oldEndY < con.b.srWindow.Top)
|
||||
{
|
||||
con.dwEnd.Y = con.b.dwCursorPosition.Y = oldEndY;
|
||||
y1 = con.b.srWindow.Top;
|
||||
|
Loading…
x
Reference in New Issue
Block a user