mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker): only do preview scrolling when preview is scrolling and removed default preview horizontal scrolling keymaps
This commit is contained in:
parent
927f50200e
commit
a998c714c3
2 changed files with 12 additions and 8 deletions
|
@ -382,19 +382,27 @@ function M.help(picker)
|
|||
end
|
||||
|
||||
function M.preview_scroll_down(picker)
|
||||
picker.preview.win:scroll()
|
||||
if picker.preview.win:valid() then
|
||||
picker.preview.win:scroll()
|
||||
end
|
||||
end
|
||||
|
||||
function M.preview_scroll_up(picker)
|
||||
picker.preview.win:scroll(true)
|
||||
if picker.preview.win:valid() then
|
||||
picker.preview.win:scroll(true)
|
||||
end
|
||||
end
|
||||
|
||||
function M.preview_scroll_left(picker)
|
||||
picker.preview.win:hscroll(true)
|
||||
if picker.preview.win:valid() then
|
||||
picker.preview.win:hscroll(true)
|
||||
end
|
||||
end
|
||||
|
||||
function M.preview_scroll_right(picker)
|
||||
picker.preview.win:hscroll()
|
||||
if picker.preview.win:valid() then
|
||||
picker.preview.win:hscroll()
|
||||
end
|
||||
end
|
||||
|
||||
function M.inspect(picker, item)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue