1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 22:08:00 +01:00

begin cleaning up v.mappings and add a default iterator function to v.modes

This commit is contained in:
Doug Kearns
2007-11-29 11:20:55 +00:00
parent 06a60ef443
commit 04b50114f0
4 changed files with 77 additions and 91 deletions

View File

@@ -154,6 +154,17 @@ vimperator.modes = (function () //{{{
MENU: 1 << 18, // a popupmenu is active
LINE: 1 << 19, // linewise visual mode
__iterator__: function ()
{
var modes = [this.NONE, this.NORMAL, this.INSERT, this.VISUAL,
this.HINTS, this.COMMAND_LINE, this.CARET, this.TEXTAREA];
for (var i = 0; i < modes.length; i++)
yield modes[i];
throw StopIteration;
},
reset: function (silent)
{
this.set(vimperator.modes.NORMAL, vimperator.modes.NONE, silent);