mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-31 00:35:46 +01:00
Smart :autocmd completer
This commit is contained in:
7
common/content/autocommands.js
Normal file → Executable file
7
common/content/autocommands.js
Normal file → Executable file
@@ -194,7 +194,12 @@ const AutoCommands = Module("autocommands", {
|
||||
}
|
||||
}, {
|
||||
bang: true,
|
||||
completer: function (context) completion.autocmdEvent(context),
|
||||
completer: function (context, args) {
|
||||
if (args.length == 1)
|
||||
return completion.autocmdEvent(context);
|
||||
if (args.length == 3)
|
||||
return args["-javascript"] ? completion.javascript(context) : completion.ex(context);
|
||||
},
|
||||
literal: 2,
|
||||
options: [[["-javascript", "-js"], commands.OPTION_NOARG]]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user