1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-31 21:15:52 +01:00

:delmacros regex added

This commit is contained in:
Marco Candrian
2008-01-21 12:12:26 +00:00
parent 09a4c0e15b
commit 7982265c98
3 changed files with 26 additions and 3 deletions

View File

@@ -485,7 +485,6 @@ vimperator.Events = function () //{{{
window.removeEventListener("keydown", this.onKeyDown, true);
},
startRecording: function (macro)
{
if (!/[a-zA-Z0-9]/.test(macro))
@@ -556,6 +555,17 @@ vimperator.Events = function () //{{{
return filtered; //XXX: returns a real copy, since this is only a 'var ..'?
},
delMacros: function (filter)
{
var re = new RegExp(filter);
for (var item in macros)
{
if (item.match(re))
delete macros[item];
}
},
// This method pushes keys into the event queue from vimperator
// it is similar to vim's feedkeys() method, but cannot cope with
// 2 partially feeded strings, you have to feed one parsable string