Skip to content

Commit 286daec

Browse files
committed
Set default autocmd pattern to be "*".
Fixes issue #64
1 parent a136918 commit 286daec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neovim/plugin/decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def dec(f):
7878
return dec
7979

8080

81-
def autocmd(name, pattern=None, sync=False, eval=None):
81+
def autocmd(name, pattern='*', sync=False, eval=None):
8282
"""Tag a function or plugin method as a Nvim autocommand handler."""
8383
def dec(f):
8484
f._nvim_rpc_method_name = 'autocmd:{0}:{1}'.format(name, pattern)
@@ -87,7 +87,7 @@ def dec(f):
8787
f._nvim_prefix_plugin_path = True
8888

8989
opts = {
90-
'pattern': pattern or '*'
90+
'pattern': pattern
9191
}
9292

9393
if eval:

0 commit comments

Comments
 (0)