fix(files.current_buffer_fuzzy_find): fix nil indexing on enter if nothing is selected (#2678)

(cherry picked from commit 2c1ed33a6f)
This commit is contained in:
cristiansofronie
2023-09-05 16:09:05 +02:00
committed by Simon Hauser
parent c4032ad297
commit a52167fe41
+4
View File
@@ -514,6 +514,10 @@ files.current_buffer_fuzzy_find = function(opts)
action_set.select:enhance {
post = function()
local selection = action_state.get_selected_entry()
if not selection then
return
end
vim.api.nvim_win_set_cursor(0, { selection.lnum, 0 })
end,
}