Skip to content

Commit 29c58a6

Browse files
committedSep 19, 2023
fix(autocmds): improve WinScrolled autocmd to refresh indent blankline
1 parent 66ef5fc commit 29c58a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎lua/astronvim/autocmds.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ if is_available "indent-blankline.nvim" then
224224
group = augroup("indent_blankline_refresh_scroll", { clear = true }),
225225
callback = function()
226226
-- TODO: remove neovim version check when dropping support for Neovim 0.8
227-
if vim.fn.has "nvim-0.9" ~= 1 or vim.v.event.all.leftcol ~= 0 then pcall(vim.cmd.IndentBlanklineRefresh) end
227+
if vim.fn.has "nvim-0.9" ~= 1 or (vim.v.event.all and vim.v.event.all.leftcol ~= 0) then
228+
pcall(vim.cmd.IndentBlanklineRefresh)
229+
end
228230
end,
229231
})
230232
end

0 commit comments

Comments
 (0)
Please sign in to comment.