Skip to content

Commit

Permalink
fix: fixed 0 after an operator. Wrongly assumed any number to be a co…
Browse files Browse the repository at this point in the history
…unt for following op mode, but not the case for 0 #59 #61
  • Loading branch information
folke committed May 12, 2021
1 parent 5c5b5f5 commit 36616ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/which-key/keys.lua
Expand Up @@ -44,7 +44,7 @@ function M.process_motions(ret, mode, prefix, buf)
if (mode == "n" or mode == "v") and operator then
local op_prefix = prefix:sub(#operator + 1)
local op_count = op_prefix:match("^(%d+)")
if op_count then
if op_count and op_count ~= "0" then
op_prefix = op_prefix:sub(#op_count + 1)
end
local op_results = M.get_mappings("o", op_prefix, buf)
Expand Down

0 comments on commit 36616ca

Please sign in to comment.