Skip to content

Commit 2263b7d

Browse files
Minor validation order change, marks can still be unloaded even if buffer is invalid
1 parent 7ffd82a commit 2263b7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/render-markdown/ui.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ M.clear_valid = function(buf)
5353
if not vim.api.nvim_buf_is_valid(buf) then
5454
return false
5555
end
56-
if util.buf_to_win(buf) < 0 then
57-
return false
58-
end
5956
if not vim.tbl_contains(state.config.file_types, vim.bo[buf].filetype) then
6057
return false
6158
end
6259
vim.api.nvim_buf_clear_namespace(buf, M.namespace, 0, -1)
60+
if util.buf_to_win(buf) < 0 then
61+
return false
62+
end
6363
util.set_conceal(buf, state.config.conceal.default)
6464
return true
6565
end

0 commit comments

Comments
 (0)