Skip to content

Commit

Permalink
fix(condition): loosen validity check in buffer_matches
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Dec 12, 2023
1 parent 3d1f7b0 commit d4fb5c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/astroui/status/condition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ local buf_matchers = {
function M.buffer_matches(patterns, bufnr, op)
if not op then op = "or" end
if not bufnr then bufnr = 0 end
if require("astrocore.buffer").is_valid(bufnr) then
if vim.api.nvim_buf_is_valid(bufnr) then
for kind, pattern_list in pairs(patterns) do
if buf_matchers[kind](pattern_list, bufnr) then
if op == "or" then return true end
Expand Down

0 comments on commit d4fb5c2

Please sign in to comment.