mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 01:47:58 +01:00
Replace spurious modes.replace call that Doug, er, warned be about before I committed it.
--HG-- branch : mode-refactoring
This commit is contained in:
@@ -701,7 +701,7 @@ const Editor = Module("editor", {
|
|||||||
function (count) {
|
function (count) {
|
||||||
dactyl.assert(editor.isTextEdit);
|
dactyl.assert(editor.isTextEdit);
|
||||||
editor.executeCommand("cmd_cut");
|
editor.executeCommand("cmd_cut");
|
||||||
modes.replace(modes.INSERT, modes.TEXT_EDIT);
|
modes.push(modes.INSERT);
|
||||||
});
|
});
|
||||||
|
|
||||||
mappings.add([modes.VISUAL],
|
mappings.add([modes.VISUAL],
|
||||||
|
|||||||
@@ -265,8 +265,10 @@ const Modes = Module("modes", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
replace: function (mode, oldMode) {
|
replace: function (mode, oldMode) {
|
||||||
// TODO: This should really be done in one step.
|
while (oldMode && this._modeStack.length > 1 && this.main != oldMode)
|
||||||
this.pop(oldMode);
|
this.pop();
|
||||||
|
|
||||||
|
this.set(mode, null, null, { push: this.topOfStack, pop: this._modeStack.pop() });
|
||||||
this.push(mode);
|
this.push(mode);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user