Skip to content

Commit

Permalink
fix: typed is a nil value, screenkey shows nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
NStefan002 committed Apr 18, 2024
1 parent 6a898f6 commit 6dc082f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/screenkey/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,12 @@ function M.toggle()
active = not active
end

vim.on_key(function(_, typed)
vim.on_key(function(key, typed)
time = 0
if should_disable() then
return
end
typed = typed or key
if not active or not typed or #typed == 0 then
return
end
Expand Down

0 comments on commit 6dc082f

Please sign in to comment.