Skip to content

Commit

Permalink
fix: nil winid (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Feb 21, 2022
1 parent ca7ef2d commit f41a715
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/aerial/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ M.is_ignored_filetype = function(filetype)
end

M.is_ignored_buf = function(bufnr)
bufnr = bufnr or 0
local ignore = config.ignore
if ignore.unlisted_buffers and not vim.api.nvim_buf_get_option(bufnr, "buflisted") then
return true
Expand Down Expand Up @@ -229,6 +230,7 @@ M.is_ignored_buf = function(bufnr)
end

M.is_ignored_win = function(winid)
winid = winid or 0
local bufnr = vim.api.nvim_win_get_buf(winid)
if M.is_ignored_buf(bufnr) then
return true
Expand Down

0 comments on commit f41a715

Please sign in to comment.