mirror of
https://github.com/zoriya/virtcolumn.nvim.git
synced 2026-06-05 01:49:15 +00:00
chore: reduce the delay
`refresh` is actually very cheap
This commit is contained in:
@@ -106,7 +106,7 @@ local function refresh(args)
|
|||||||
winscrolled_timer:stop()
|
winscrolled_timer:stop()
|
||||||
winscrolled_timer:close()
|
winscrolled_timer:close()
|
||||||
end
|
end
|
||||||
winscrolled_timer = vim.defer_fn(_refresh, 150)
|
winscrolled_timer = vim.defer_fn(_refresh, 100)
|
||||||
elseif event:match "TextChanged" then
|
elseif event:match "TextChanged" then
|
||||||
if textchanged_timer and textchanged_timer:is_active() then
|
if textchanged_timer and textchanged_timer:is_active() then
|
||||||
textchanged_timer:stop()
|
textchanged_timer:stop()
|
||||||
@@ -116,9 +116,9 @@ local function refresh(args)
|
|||||||
local delay
|
local delay
|
||||||
if lines_count ~= vim.b.virtcolumn_lines_count then
|
if lines_count ~= vim.b.virtcolumn_lines_count then
|
||||||
vim.b.virtcolumn_lines_count = lines_count
|
vim.b.virtcolumn_lines_count = lines_count
|
||||||
delay = 50
|
delay = 15
|
||||||
else
|
else
|
||||||
delay = 500
|
delay = 150
|
||||||
end
|
end
|
||||||
textchanged_timer = vim.defer_fn(_refresh, delay)
|
textchanged_timer = vim.defer_fn(_refresh, delay)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user