Skip to content

Commit

Permalink
fix(action): "cursor position outside buffer" (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Nov 19, 2023
1 parent 03d8c35 commit 640d641
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/fzf-lua/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ M.vimcmd_file = function(vimcmd, selected, opts)
-- make sure we have valid column
-- 'nvim-dap' for example sets columns to 0
entry.col = entry.col and entry.col > 0 and entry.col or 1
vim.api.nvim_win_set_cursor(0, { tonumber(entry.line), tonumber(entry.col) - 1 })
pcall(vim.api.nvim_win_set_cursor, 0, { tonumber(entry.line), tonumber(entry.col) - 1 })
end
if not is_term and not opts.no_action_zz then vim.cmd("norm! zvzz") end
::continue::
Expand Down

0 comments on commit 640d641

Please sign in to comment.