Skip to content

Commit 8ed548c

Browse files
committed
Check count for 'not None' instead of truthy in command decorator
The command decorator was only checking the truthyness of `count`, which meant that a value of 0 was considered falsy and so the value not passed to the decorated function. A value of 0 for `count` should be valid since this is the default in both vim and neovim (see `help v:count`).
1 parent 80428b1 commit 8ed548c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neovim/plugin/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def dec(f):
5555

5656
if range is not None:
5757
opts['range'] = '' if range is True else str(range)
58-
elif count:
58+
elif count is not None:
5959
opts['count'] = count
6060

6161
if bang:

0 commit comments

Comments
 (0)