File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -241,16 +241,17 @@ const Events = Module("events", {
241
241
} ,
242
242
243
243
/**
244
- * Deletes all macros matching <b>filter</b>.
244
+ * Deletes the specified macros. The <b>filter</b> is a list of
245
+ * macros and ranges are supported. Eg. "ab c d e-k".
246
+ *
247
+ * @param {string } filter The list of macros to delete.
245
248
*
246
- * @param {string } filter A regular expression filter string. A null
247
- * filter deletes all macros.
248
249
*/
249
250
deleteMacros : function ( filter ) {
250
- let re = RegExp ( filter ) ;
251
+ let re = RegExp ( "[" + filter . replace ( / \s + / g , "" ) + "]" ) ;
251
252
252
253
for ( let [ item , ] in this . _macros ) {
253
- if ( re . test ( item ) || ! filter )
254
+ if ( re . test ( item ) )
254
255
this . _macros . remove ( item ) ;
255
256
}
256
257
} ,
Original file line number Diff line number Diff line change 70
70
<spec >:delmac<oa >ros</oa > <a >args</a ></spec >
71
71
<spec >:delmac<oa >ros</oa >!</spec >
72
72
<description >
73
- <p >
74
- Delete recorded macros matching the regular expression <a >args</a >. If <oa >!</oa > is given
75
- all macros are deleted.
76
- </p >
73
+ <p >Delete the specified macros. Macros are presented as a list.</p >
74
+
75
+ <p >Examples:</p >
76
+
77
+ <ul >
78
+ <li ><ex >:delmacros Aa b p</ex > deletes macros A, a, b and p</li >
79
+ <li ><ex >:delmacros b-p</ex > deletes all macros in the range b to p</li >
80
+ <li ><ex >:delmacros!</ex > deletes all macros</li >
81
+ </ul >
77
82
</description >
78
83
</item >
79
84
Original file line number Diff line number Diff line change 1
1
201x-xx-xx:
2
+ * :delmacro matches the syntax and behaviour of :delqmark, e.g. allowing ranges as argument
2
3
* Stop propagation for keyboard event if that key are contained in -except option on :ignorekeys
3
4
* Improvements in handling Esc for unfocusing text fields
4
5
* Closing the last tab of a window now respects the Firefox setting:
You can’t perform that action at this time.
0 commit comments