mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 09:00:06 +08:00
feat(recordkey): remove key via timer
This commit is contained in:
parent
f934a4128b
commit
91170cab09
@ -62,6 +62,11 @@ end
|
|||||||
|
|
||||||
local function on_key(key)
|
local function on_key(key)
|
||||||
table.insert(keys, key)
|
table.insert(keys, key)
|
||||||
|
vim.fn.timer_start(timeout, function()
|
||||||
|
if #keys > 0 then
|
||||||
|
table.remove(keys, 1)
|
||||||
|
end
|
||||||
|
end, { ['repeat'] = 1 })
|
||||||
display()
|
display()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user