RFR JDK-8171386: jshell tool: paging of javadoc output broken on Windows
Jan Lahoda
jan.lahoda at oracle.com
Fri Jan 13 09:53:38 UTC 2017
Hello,
The screen width and height detection is not working properly on
Windows, because:
-a wrong handle is passed to GetConsoleScreenBufferInfo (passed is input
handle, needs to be output handle)
-CONSOLE_SCREEN_BUFFER_INFO.dwSize.X/Y contains information about the
size of the screen buffer, not the window - need to use
CONSOLE_SCREEN_BUFFER_INFO.srWindow to find out the size of the window.
(For width of the window the returned width is one character smaller
than the actual width, as writing the very last character causes the
cursor overflow to next line, breaking the formatting.)
Bug:
https://bugs.openjdk.java.net/browse/JDK-8171386
Webrev:
http://cr.openjdk.java.net/~jlahoda/8171386/webrev.00/
Any feedback is welcome.
Thanks,
Jan
More information about the kulla-dev
mailing list