-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagination in show images misbehaves with PgUp/PgDown #108
Comments
@pupssman will test PgUp\PgDn soon. You may want to modify the following settings to fix width issue:
|
Would be super-tool for |
@pupssman haven't already implemented this because of http://stackoverflow.com/questions/1286461/can-i-find-the-console-width-with-java Seems that JLine does not work reliably on all platforms. And you can also save these settings to RC file and forget about this issue. |
@pupssman any idea how to check that PgDn is presed in Java? :) Can't find the way how to do this. |
Ehm, it looks like it is already being detected but interpreted wrong. |
@pupssman yes, same thing on my Mac. For some reason PgDn key is being interpreted just as I'm pressing numeric key = 6. In your example you have only 3 pages that's why it complains about wrong page number. If you have more than 6 pages it switches to page 5 or 6 depending on key. |
I will postpone this for the future because after deep investigation it seems that handling PageDown is not a trivial task because in Bash it's represented as an Ansi escape sequence (i.e. 3 or 4 chars). Right now we expect only one char so the working solution to handle PageDown is like that (it even requires Executors!!):
The PageDown key can be coded like:
I implemented all this stuff and even added a test but it only works for the first page down press. Then something internal in ConsoleReader prevents next key press to work (probably some colored output processing logic). |
Wow, weird. |
What to do:
show images
Example output:
Also, pagination notice is gone off-the-screen due to line wrap of the output.
I am running latest (of now)
perspective
docker container from Ubuntu.Terminal dims are
The text was updated successfully, but these errors were encountered: