fix: ensure buffer is listed before edit_buffer (#1492)

This commit is contained in:
Richard Lu
2021-12-07 04:13:24 +08:00
committed by GitHub
parent a88d92417d
commit a20f01353b

View File

@@ -125,6 +125,9 @@ action_set.edit = function(prompt_bufnr, command)
require("telescope.actions").close(prompt_bufnr)
if entry_bufnr then
if not vim.api.nvim_buf_get_option(entry_bufnr, "buflisted") then
vim.api.nvim_buf_set_option(entry_bufnr, "buflisted", true)
end
edit_buffer(command, entry_bufnr)
else
-- check if we didn't pick a different buffer