fix(picker): only do preview scrolling when preview is scrolling and removed default preview horizontal scrolling keymaps

This commit is contained in:
Folke Lemaitre 2025-01-30 18:17:30 +01:00
parent 927f50200e
commit a998c714c3
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 12 additions and 8 deletions

View file

@ -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)