silence netrw preview scroll boundaries

This commit is contained in:
Ray Elliott 2026-10-28 18:52:13 +00:00
commit 4a721f051e
3 changed files with 3 additions and 1 deletions

View file

@ -633,7 +633,7 @@ local function scroll_preview(direction, count)
end
local key = vim.keycode(direction > 0 and '<C-e>' or '<C-y>')
vim.api.nvim_win_call(preview, function()
pcall(vim.api.nvim_win_call, preview, function()
vim.cmd.normal({ args = { tostring(count) .. key }, bang = true })
end)
end