Fix so that oil can change buffers in the oil window, but you cannot change to another buffer inside the oil window.
This commit is contained in:
parent
2ba73eb10e
commit
9fc2ef3bb0
2 changed files with 31 additions and 16 deletions
|
|
@ -8,4 +8,18 @@ function M.add_keymaps(maps)
|
|||
end
|
||||
end
|
||||
|
||||
function M.get_bufnr_for_filetype(filetype)
|
||||
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
|
||||
if vim.bo[buf].filetype == filetype then
|
||||
return buf
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
function M.is_buf_filetype(bufnr, filetype)
|
||||
return vim.bo[bufnr].filetype == filetype
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue