fix(blame): don't lag on folded lines

This commit is contained in:
Lewis Russell 2022-05-26 12:55:53 +01:00
parent 3b2e7b668c
commit 27aeb2e715
3 changed files with 11 additions and 0 deletions

View File

@ -110,6 +110,11 @@ local update = void(function()
set_extmark(bufnr, lnum)
end
if vim.fn.foldclosed(lnum) ~= -1 then
return
end
local opts = config.current_line_blame_opts

View File

@ -110,6 +110,11 @@ local update = void(function()
set_extmark(bufnr, lnum)
end
-- Can't show extmarks on folded lines so skip
if vim.fn.foldclosed(lnum) ~= -1 then
return
end
local opts = config.current_line_blame_opts
-- Note because the same timer is re-used, this call has a debouncing effect.

View File

@ -222,6 +222,7 @@ global record vim
getpos: function(string): {integer}
executable: function(string): integer
expand: function(string): string
foldclosed: function(integer): integer
getcwd: function(): string
input: function(string, string): string