spring-projects / spring-shell

Spring based shell
http://projects.spring.io/spring-shell/
Apache License 2.0
719 stars 395 forks source link

TerminalUI full screen off on windows #1041

Closed jvalkeal closed 4 months ago

jvalkeal commented 4 months ago

Running catalog app on windows terminals misses menubar. As seen from screenshot it looks like it's off vertically by one line.

catalog-wrong-draw

Notice empty line at bottom. Logs shows that everything is drawn in correct positions so issue may be somewhere within jline's windows related terminal classes. Almost feels like one extra line is always drawn thus moving everything up one line thus menubar goes off screen.

This is same on cmd and powershell. Using jna vs. jansi doesn't make difference.

jvalkeal commented 4 months ago

Looks like this boils down to:

https://github.com/jline/jline3/blob/19c031c0bccaeea6a4346bc82c04c7bd3ec18888/terminal/src/main/java/org/jline/utils/Display.java#L310-L312

If I modify that particular section so that last row will not write that extra space and backspace things on a screen will look normal. This section looks to be executed on windows but not sure on what terminals will also get there.

As short term we could fork jline's Display class and experiment fix and then try to contribute back to jline.

catalog-correct-draw