Skip to content

Commit

Permalink
fix: AerialClose closes other wins if buf has no symbols (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed May 8, 2022
1 parent 6534703 commit f1dfb0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/aerial/window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ M.close = function()
if aer_bufnr == -1 then
-- No aerial buffer for this buffer.
local backend = backends.get()
-- If this buffer has no supported symbols backend,
-- If this buffer has no supported symbols backend or no symbols,
-- look for other aerial windows and close the first
if backend == nil then
if backend == nil or not data:has_symbols(0) then
for _, winid in ipairs(vim.api.nvim_tabpage_list_wins(0)) do
local winbuf = vim.api.nvim_win_get_buf(winid)
if util.is_aerial_buffer(winbuf) then
Expand Down

0 comments on commit f1dfb0a

Please sign in to comment.