mirror of
https://github.com/zoriya/virtcolumn.nvim.git
synced 2026-06-04 01:25:57 +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:close()
|
||||
end
|
||||
winscrolled_timer = vim.defer_fn(_refresh, 150)
|
||||
winscrolled_timer = vim.defer_fn(_refresh, 100)
|
||||
elseif event:match "TextChanged" then
|
||||
if textchanged_timer and textchanged_timer:is_active() then
|
||||
textchanged_timer:stop()
|
||||
@@ -116,9 +116,9 @@ local function refresh(args)
|
||||
local delay
|
||||
if lines_count ~= vim.b.virtcolumn_lines_count then
|
||||
vim.b.virtcolumn_lines_count = lines_count
|
||||
delay = 50
|
||||
delay = 15
|
||||
else
|
||||
delay = 500
|
||||
delay = 150
|
||||
end
|
||||
textchanged_timer = vim.defer_fn(_refresh, delay)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user