mirror of https://github.com/folke/lazy.nvim.git
feat: config option for ui throttle
This commit is contained in:
parent
0cff878b2e
commit
a197f751f9
|
@ -37,6 +37,7 @@ M.defaults = {
|
||||||
-- defaults for `Lazy log`
|
-- defaults for `Lazy log`
|
||||||
log = { "-10" }, -- last 10 commits
|
log = { "-10" }, -- last 10 commits
|
||||||
-- log = { "--since=3 days ago" }, -- commits from the last 3 days
|
-- log = { "--since=3 days ago" }, -- commits from the last 3 days
|
||||||
|
throttle = 20, -- how frequently should the ui process render events
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ function M.show(mode)
|
||||||
})
|
})
|
||||||
|
|
||||||
local render = Render.new(buf, win, 2)
|
local render = Render.new(buf, win, 2)
|
||||||
local update = Util.throttle(30, function()
|
local update = Util.throttle(Config.options.ui.throttle, function()
|
||||||
if buf and vim.api.nvim_buf_is_valid(buf) then
|
if buf and vim.api.nvim_buf_is_valid(buf) then
|
||||||
vim.bo[buf].modifiable = true
|
vim.bo[buf].modifiable = true
|
||||||
render:update()
|
render:update()
|
||||||
|
|
Loading…
Reference in New Issue