* Fix: open files with the same name (#697) * Fix: fire vim.cmd if command is not edit (#760)
This commit is contained in:
@@ -108,11 +108,11 @@ set.edit = function(prompt_bufnr, command)
|
||||
if entry_bufnr then
|
||||
edit_buffer(command, entry_bufnr)
|
||||
else
|
||||
filename = path.normalize(vim.fn.fnameescape(filename), vim.loop.cwd())
|
||||
|
||||
-- check if we didn't pick a different buffer
|
||||
-- prevents restarting lsp server
|
||||
if vim.api.nvim_get_current_buf() ~= vim.fn.bufnr(filename) then
|
||||
if vim.api.nvim_buf_get_name(0) ~= filename or command ~= "edit" then
|
||||
filename = path.normalize(vim.fn.fnameescape(filename), vim.loop.cwd())
|
||||
vim.cmd(string.format("%s %s", command, filename))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user