Skip to content

Commit

Permalink
feat: config option for ui throttle
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 30, 2022
1 parent 0cff878 commit a197f75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/lazy/core/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ M.defaults = {
-- defaults for `Lazy log`
log = { "-10" }, -- last 10 commits
-- log = { "--since=3 days ago" }, -- commits from the last 3 days
throttle = 20, -- how frequently should the ui process render events
},
}

Expand Down
2 changes: 1 addition & 1 deletion lua/lazy/view/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function M.show(mode)
})

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
vim.bo[buf].modifiable = true
render:update()
Expand Down

0 comments on commit a197f75

Please sign in to comment.