Commit ed6994d
committed
fix(binds): route preview scroll as DIRECT for fzf previewers
Preview scroll actions (preview-half-page-down, preview-page-down,
etc.) in keymap.builtin go through the transform handler which calls
win.lua functions operating on the neovim preview buffer. With fzf
previewers (bat, git status/commits), the preview is in fzf pane so
these functions are no-ops and scrolling does nothing.
Fix: in classify_bind, when a preview action matches a whitelist of
valid fzf preview action names and the previewer is fzf-native, set
entry.fzf_action and return DIRECT so fzf processes it natively.
Detect fzf previewer via opts.previewer (set for explicit previewer
like "bat") or opts.preview (set by providers like git_commits when
the preview command is a fzf --preview string). Only when BOTH are
nil is the previewer the neovim builtin overlay.
Whitelist prevents invalid fzf action names (preview-reset,
preview-ts-ctx-*, etc.) from being routed as DIRECT which would
cause fzf to error.1 parent 5f6ea90 commit ed6994d
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
274 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
275 | 307 | | |
276 | 308 | | |
277 | 309 | | |
| |||
0 commit comments