Respect sp, vsp, tabe mappings for buffers builtin (#99)

Closes: #98
This commit is contained in:
Simon Hauser
2020-09-18 15:18:27 +02:00
committed by GitHub
parent 80dd7e7711
commit 7b1ebe7fce

View File

@@ -91,8 +91,12 @@ local function goto_file_selection(prompt_bufnr, command)
-- TODO: Sometimes we open something with missing line numbers and stuff... -- TODO: Sometimes we open something with missing line numbers and stuff...
if entry_bufnr then if entry_bufnr then
a.nvim_win_set_buf(original_win_id, entry_bufnr) if command == "e" then
vim.api.nvim_command("doautocmd filetypedetect BufRead " .. vim.fn.fnameescape(filename)) a.nvim_win_set_buf(original_win_id, entry_bufnr)
vim.api.nvim_command("doautocmd filetypedetect BufRead " .. vim.fn.fnameescape(filename))
else
vim.cmd(string.format(":%s #%d", command, entry_bufnr))
end
else else
vim.cmd(string.format(":%s %s", command, filename)) vim.cmd(string.format(":%s %s", command, filename))