mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 13:52:26 +01:00
add a bang version of delmacros to delete all macros
This commit is contained in:
@@ -1082,9 +1082,7 @@ liberator.Buffer = function () //{{{
|
||||
|
||||
highlight: function (key, style)
|
||||
{
|
||||
liberator.log("key: " + key + ", style: " + style);
|
||||
let [, class, selectors] = key.match(/^([a-zA-Z_-]+)(.*)/);
|
||||
liberator.log("class: " + class + ", selectors: " + selectors);
|
||||
|
||||
if (highlightClasses.indexOf(class) == -1)
|
||||
{
|
||||
|
||||
@@ -677,9 +677,15 @@ liberator.Events = function () //{{{
|
||||
|
||||
liberator.commands.add(["delmac[ros]"],
|
||||
"Delete macros",
|
||||
function (args) { liberator.events.deleteMacros(args); },
|
||||
function (args, special)
|
||||
{
|
||||
argCount: "+", // pattern might contain whitespace
|
||||
if (special)
|
||||
args = ".*"; // XXX
|
||||
|
||||
liberator.events.deleteMacros(args);
|
||||
},
|
||||
{
|
||||
bang: true,
|
||||
completer: function (filter) liberator.completion.macro(filter)
|
||||
});
|
||||
|
||||
|
||||
@@ -25,8 +25,10 @@ ________________________________________________________________________________
|
||||
|
||||
|:delmac| |:delmacros|
|
||||
||:delmac[ros] {args}|| +
|
||||
||:delmac[ros]!||
|
||||
________________________________________________________________________________
|
||||
Delete recorded macros matching the regular expression [args].
|
||||
Delete recorded macros matching the regular expression [args]. If [!] is given
|
||||
all macros are deleted.
|
||||
________________________________________________________________________________
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user