fix: respect tabbar (#2280)
This commit is contained in:
@@ -993,10 +993,14 @@ function M.open_buffer(path, set_current_buf)
|
|||||||
|
|
||||||
local abs_path = M.join_paths(M.get_project_root(), path)
|
local abs_path = M.join_paths(M.get_project_root(), path)
|
||||||
|
|
||||||
local bufnr = vim.fn.bufnr(abs_path, true)
|
local bufnr
|
||||||
vim.fn.bufload(bufnr)
|
if set_current_buf then
|
||||||
|
vim.cmd("edit " .. abs_path)
|
||||||
if set_current_buf then vim.api.nvim_set_current_buf(bufnr) end
|
bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
else
|
||||||
|
bufnr = vim.fn.bufnr(abs_path, true)
|
||||||
|
vim.fn.bufload(bufnr)
|
||||||
|
end
|
||||||
|
|
||||||
vim.cmd("filetype detect")
|
vim.cmd("filetype detect")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user