@@ -110,7 +110,7 @@ action_set.edit = function(prompt_bufnr, command)
|
|||||||
|
|
||||||
-- TODO: Check for off-by-one
|
-- TODO: Check for off-by-one
|
||||||
row = entry.row or entry.lnum
|
row = entry.row or entry.lnum
|
||||||
col = vim.F.if_nil(entry.col, 1)
|
col = entry.col
|
||||||
elseif not entry.bufnr then
|
elseif not entry.bufnr then
|
||||||
-- TODO: Might want to remove this and force people
|
-- TODO: Might want to remove this and force people
|
||||||
-- to put stuff into `filename`
|
-- to put stuff into `filename`
|
||||||
@@ -169,6 +169,11 @@ action_set.edit = function(prompt_bufnr, command)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if row == nil or col == nil then
|
||||||
|
local pos = vim.api.nvim_win_get_cursor(0)
|
||||||
|
row, col = pos[1], pos[2] + 1
|
||||||
|
end
|
||||||
|
|
||||||
if row and col then
|
if row and col then
|
||||||
local ok, err_msg = pcall(a.nvim_win_set_cursor, 0, { row, col })
|
local ok, err_msg = pcall(a.nvim_win_set_cursor, 0, { row, col })
|
||||||
if not ok then
|
if not ok then
|
||||||
|
|||||||
Reference in New Issue
Block a user