fix: Don't fail if we can't save undo info

This commit is contained in:
TJ DeVries
2020-09-17 08:28:50 -04:00
parent d170d60116
commit 7bdb39b138

View File

@@ -593,6 +593,7 @@ function Picker:set_selection(row)
return
end
local set_ok, set_errmsg = pcall(function()
-- Handle adding '> ' to beginning of selections
if self._selection_row then
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,
-1
)
end)
if not set_ok then
log.debug(set_errmsg)
return
end
-- if self._match_id then
-- -- vim.fn.matchdelete(self._match_id)