mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-13 13:35:47 +01:00
Fix beep when starting REPL mode.
This commit is contained in:
@@ -446,19 +446,22 @@ var Modes = Module("modes", {
|
|||||||
while (this._modeStack.length > 1 && this.main != mode) {
|
while (this._modeStack.length > 1 && this.main != mode) {
|
||||||
let a = this._modeStack.pop();
|
let a = this._modeStack.pop();
|
||||||
this.set(this.topOfStack.main, this.topOfStack.extended, this.topOfStack.params,
|
this.set(this.topOfStack.main, this.topOfStack.extended, this.topOfStack.params,
|
||||||
update({ pop: a }, args || {}));
|
update({ pop: a },
|
||||||
|
args || {}));
|
||||||
|
|
||||||
if (mode == null)
|
if (mode == null)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
replace: function replace(mode, oldMode) {
|
replace: function replace(mode, oldMode, args) {
|
||||||
while (oldMode && this._modeStack.length > 1 && this.main != oldMode)
|
while (oldMode && this._modeStack.length > 1 && this.main != oldMode)
|
||||||
this.pop();
|
this.pop();
|
||||||
|
|
||||||
if (this._modeStack.length > 1)
|
if (this._modeStack.length > 1)
|
||||||
this.set(mode, null, null, { push: this.topOfStack, pop: this._modeStack.pop() });
|
this.set(mode, null, null,
|
||||||
|
update({ push: this.topOfStack, pop: this._modeStack.pop() },
|
||||||
|
args || {}));
|
||||||
this.push(mode);
|
this.push(mode);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -791,12 +791,12 @@ var JavaScript = Module("javascript", {
|
|||||||
this.repl = REPL(this.context);
|
this.repl = REPL(this.context);
|
||||||
},
|
},
|
||||||
open: function open(context) {
|
open: function open(context) {
|
||||||
this.updatePrompt();
|
|
||||||
|
|
||||||
modules.mow.echo(this.repl);
|
modules.mow.echo(this.repl);
|
||||||
this.widgets.message = null;
|
this.widgets.message = null;
|
||||||
|
|
||||||
open.superapply(this, arguments);
|
open.superapply(this, arguments);
|
||||||
|
this.updatePrompt();
|
||||||
},
|
},
|
||||||
|
|
||||||
complete: function complete(context) {
|
complete: function complete(context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user