summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-07-27 07:49:54 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-07-27 07:49:54 -0700
commit0422f5458e76aedf04d539c338da534ff8889ad1 (patch)
tree28ba555c99b52f15eab51237556afe42e5960def /winsup/cygwin/fhandler.h
parentc8e861357533943469f18e078308c77dede773b3 (diff)
downloadcygnal-0422f5458e76aedf04d539c338da534ff8889ad1.tar.gz
cygnal-0422f5458e76aedf04d539c338da534ff8889ad1.tar.bz2
cygnal-0422f5458e76aedf04d539c338da534ff8889ad1.zip
Replace bogus resize-window-to-clear-screen logic.cygnal-release-2.5.2
This removes (ab)uses of SetConsoleScreenBufferSize which sometimes cause cmd.exe to badly misbehave. It probably doesn't like the closely spaced timing of shrinking the window down to one line followed by a restore of the size. Instead we just output newlines to clear the window. * winsup/cygwin/fhandler.h (dev_console::scroll_window): Member function declaration removed. (dev_console::clear_should_scroll): New member function declared. * winsup/cygwin/fhandler_console.cc (dev_console::scroll_window): Member function removed. (dev_console::clear_should_scroll): New member function. Performs only the test that was performed by scroll_window, not the actual scrolling. The scrolling is now done in the caller in the fhandler_console class. (fhandler_console::clear_screen): Call con.clear_should_scroll instead of con.scroll_window. If this returns false, act as before. Otherwise, clear the screen by scrolling the window. This is done not by making SetConsoleScreenBufferSize calls to shrink and restore the window, but by earnestly emitting a number of carriage returns equal to the vertical screen size and then restoring the cursor position.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 21c71d702..4af584be2 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -1361,7 +1361,7 @@ class dev_console
int set_cl_x (cltype);
int set_cl_y (cltype);
bool fillin (HANDLE);
- bool __reg3 scroll_window (HANDLE, int, int, int, int);
+ bool __reg3 clear_should_scroll (HANDLE, int, int, int, int);
void __reg3 scroll_buffer (HANDLE, int, int, int, int, int, int);
void __reg3 clear_screen (HANDLE, int, int, int, int);
void __reg3 save_restore (HANDLE, char);