Skip to content

Commit

Permalink
fix: close aerial when it's the last window (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed May 2, 2022
1 parent f5122b6 commit 8d2ef96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/aerial/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ end

M.is_ignored_buf = function(bufnr)
bufnr = bufnr or 0
local filetype = vim.api.nvim_buf_get_option(bufnr, "filetype")
-- Never ignore aerial buffers
if filetype == "aerial" then
return false
end
local ignore = config.ignore
if ignore.unlisted_buffers and not vim.api.nvim_buf_get_option(bufnr, "buflisted") then
return true
Expand All @@ -185,7 +190,6 @@ M.is_ignored_buf = function(bufnr)
end
end
if ignore.filetypes then
local filetype = vim.api.nvim_buf_get_option(bufnr, "filetype")
if M.is_ignored_filetype(filetype) then
return true
end
Expand Down

0 comments on commit 8d2ef96

Please sign in to comment.