-
Notifications
You must be signed in to change notification settings - Fork 152
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
Bug: Builtin preview scroll misbehaviors #1525
Comments
That is somewhat by design, the neovim previewer sends |
Thanks your fast comment for issue 1. Sorry to bother but I still want to know why I can't scroll a whole page back as I mentioned in issue 2. |
Oh, another question. In telescope.nvim I can scroll to to the top of buffer using one
I thought this sort of sounds like builtin previewer? |
Idk what telescope does now exactly but as far as I recall the preview sends ctrl-u/d to scroll, if you want to match Telescope’s behavior change Here’s my original comment in the code for this issue: fzf-lua/lua/fzf-lua/previewer/builtin.lua Lines 360 to 374 in 8af7f00
I modified the ctrl-b hack to also scroll up to top if the change is just 1 line, it’s not perfect and depending on the size of the preview near the top it will sometimes scroll 2 lines (and only then you can press another scroll to top), although I could fix this to scroll by relative number of lines by manually moving the cursor I won’t think this issue is worth the time, if you’re really bothered by it change the key maps to |
RTFM Checklist
man fzf
/ I am well versed in shell fzfOperating system
macOS 14.6.1
Shell
zsh
Neovim version (
nvim --version
)v0.10.2
Fzf version (
fzf --version
)0.55.0 (brew)
Output of
:lua print(os.getenv('FZF_DEFAULT_OPTS'))
nil
Is the problem reproducible with
mini.sh
?mini.sh
mini.sh
mini.sh
(not relevant, requires LSP, Windows, etc)Fzf-lua configuration
Describe the bug / steps to reproduce
Issue 1:
Sometimes preview-half-page-up only scrolls up one line rather than half page.
To reproduce
Execute
sh -c "$(curl -s https://raw.githubusercontent.com/ibhagwan/fzf-lua/main/scripts/mini.sh)"
, run:FzfLua files
, and press "shift-arrow down" to scroll down half page, the first line number of preview window becomes 20:Now press "shift-arrow up", the first line becomes 19 instead of 1:
Press "shift-arrow up" again, the first line becomes 1.
Issue 2:
Preview-page-up only scrolls up half page instead of whole page. I've check fzf previewer like bat, and the preview scroll is normal.
The text was updated successfully, but these errors were encountered: