Skip to content

Commit

Permalink
fix(previewer): page up at top of buffer (closes #1525)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Nov 14, 2024
1 parent 8af7f00 commit 2a7eb32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/fzf-lua/previewer/builtin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ function Previewer.base:scroll(direction)
local pos = is_ctrl_b and vim.api.nvim_win_get_cursor(0)
if is_ctrl_b and pos[1] == 1 then return end
vim.cmd([[norm! ]] .. input)
if is_ctrl_b and pos[1] <= vim.api.nvim_win_get_cursor(0)[1] then
if is_ctrl_b and pos[1] <= vim.api.nvim_win_get_cursor(0)[1] + 1 then
vim.api.nvim_win_set_cursor(0, { 1, pos[2] })
end
utils.zz()
Expand Down

0 comments on commit 2a7eb32

Please sign in to comment.