[consoleui] Make prompts work in non-fullscreen mode by gnodet · Pull Request #1283 · jline/jline3 (original) (raw)
This change fixes issue jline#1239 by removing the use of alternate screen buffer (enter_ca_mode/exit_ca_mode) in the ConsolePrompt class. This allows the consoleui component to create UIs in the default buffer instead of always switching to full screen mode in the secondary buffer.
Key changes:
- Remove terminal.puts(InfoCmp.Capability.enter_ca_mode) from open()
- Remove terminal.puts(InfoCmp.Capability.exit_ca_mode) from close()
- Pass Display instance through the AbstractPrompt hierarchy
- Simplify resetDisplay() method to avoid recreating the Display instance
- Do not call reset() when refreshing the display
- Do not redisplay the results and only print a newline at the end
- Add UP/DOWN key bindings to InputValuePrompt
This makes consoleui more suitable for CLI commands that need a nice interface without taking over the entire terminal.
gnodet deleted the fix-1239-non-fullscreen-prompts branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})