mirror of
https://github.com/lewis6991/gitsigns.nvim
synced 2025-02-22 15:57:09 +00:00
fix(blame): don't lag on folded lines
This commit is contained in:
parent
3b2e7b668c
commit
27aeb2e715
5
lua/gitsigns/current_line_blame.lua
generated
5
lua/gitsigns/current_line_blame.lua
generated
@ -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
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user