fix(action): ensure delete_mark handles uppercase marks
* fix(action): delete_mark can not delete an uppercase named mark which not in the current buffer * Update init.lua Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com> * format and lint --------- Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com> Co-authored-by: James Trew <j.trew10@gmail.com>
This commit is contained in:
@@ -1463,7 +1463,13 @@ actions.delete_mark = function(prompt_bufnr)
|
||||
local bufname = selection.filename
|
||||
local bufnr = vim.fn.bufnr(bufname)
|
||||
local mark = selection.ordinal:sub(1, 1)
|
||||
local success = pcall(vim.api.nvim_buf_del_mark, bufnr, mark)
|
||||
|
||||
local success
|
||||
if mark:match "%u" then
|
||||
success = pcall(vim.api.nvim_del_mark, mark)
|
||||
else
|
||||
success = pcall(vim.api.nvim_buf_del_mark, bufnr, mark)
|
||||
end
|
||||
return success
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user