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

This commit is contained in:
cristiansofronie
2023-08-30 20:33:30 +03:00
committed by GitHub
parent 32e6792f86
commit 2c1ed33a6f

View File

@@ -538,6 +538,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,
}