Skip to content

Commit 8d696e6

Browse files
committed
fix: improve mode check for disabling diagnostics. Fixes #118
1 parent 65e52a3 commit 8d696e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/tiny-inline-diagnostic/diagnostic.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,9 @@ local function setup_mode_change_autocmds(autocmd_ns, bufnr)
311311
return
312312
end
313313

314-
if vim.tbl_contains(DISABLED_MODES, mode) then
314+
if vim.iter(DISABLED_MODES):any(function(m)
315+
return string.find(mode, m) ~= nil
316+
end) then
315317
disable()
316318
extmarks.clear(event.buf)
317319
else

0 commit comments

Comments
 (0)