-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: --list-themes pagination
#3457
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
fix: --list-themes pagination
#3457
Conversation
|
It was caused by launching less with “quit-if-one-screen” (-F) while streaming the list-themes output in chunks. Early on, less may think the content fits on one screen and won’t enter interactive mode yet, so Page Down ends up echoing the escape sequence |
|
I think we should respect the user's choices when they have |
|
Agreed. The updated change buffers |

Fixes Issue: #3455
Bug
bat --list-themes --pager=builtinandbat --list-themes --pager=lesshang after printing the first line (e.g., “Theme: 1337”). In iTerm2 the “:” prompt is hidden until resize/CR, input is in cooked mode, and display appears off-by-one.Repro:
bat --list-themes --pager=builtinbat --list-themes --pager=lessRoot cause
Changes
Only create
OutputTypewhenoutput_handle.is_none(), preventing a second pager from being started.added
attached_to_pagerthat is true when:OutputHandleis provided, orOutputTypeis a pager.Route errors to the writer when
attached_to_pager; otherwise use stderr.Set
stdout_identifier = Nonewhenattached_to_pager(and on Windows); otherwise useclircle::Identifier::stdout().