fix: Don't fail if we can't save undo info
This commit is contained in:
@@ -593,6 +593,7 @@ function Picker:set_selection(row)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local set_ok, set_errmsg = pcall(function()
|
||||||
-- Handle adding '> ' to beginning of selections
|
-- Handle adding '> ' to beginning of selections
|
||||||
if self._selection_row then
|
if self._selection_row then
|
||||||
local old_selection = a.nvim_buf_get_lines(results_bufnr, self._selection_row, self._selection_row + 1, false)[1]
|
local old_selection = a.nvim_buf_get_lines(results_bufnr, self._selection_row, self._selection_row + 1, false)[1]
|
||||||
@@ -613,6 +614,12 @@ function Picker:set_selection(row)
|
|||||||
0,
|
0,
|
||||||
-1
|
-1
|
||||||
)
|
)
|
||||||
|
end)
|
||||||
|
|
||||||
|
if not set_ok then
|
||||||
|
log.debug(set_errmsg)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- if self._match_id then
|
-- if self._match_id then
|
||||||
-- -- vim.fn.matchdelete(self._match_id)
|
-- -- vim.fn.matchdelete(self._match_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user