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

use the 'singleton' construction idiom rather than classical constructors for

creating the bookmarks, history, commandline, search, previewwindow,
bufferwindow, statusline, buffer, editor, marks and quickmarks objects
This commit is contained in:
Doug Kearns
2007-11-11 02:18:15 +00:00
parent ca8e6f4529
commit 434844b688
9 changed files with 2539 additions and 2491 deletions

View File

@@ -92,9 +92,11 @@ vimperator.modes = (function ()
{
// clear any selection made
var selection = window.content.getSelection();
try { // a simple if (selection) does not work
try
{ // a simple if (selection) does not work
selection.collapseToStart();
} catch (e) { }
}
catch (e) { }
}
else
vimperator.editor.unselectText();
@@ -122,6 +124,7 @@ vimperator.modes = (function ()
}
return {
// main modes, only one should ever be active
NONE: 0,
NORMAL: 1 << 0,
@@ -219,7 +222,8 @@ vimperator.modes = (function ()
set extended(value) {
extended = value; this.show();
}
}
};
})();
// vim: set fdm=marker sw=4 ts=4 et: