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

Deal with echoed messages being cleared by scroll event. Closes issue #374.

This commit is contained in:
Kris Maglione
2011-03-05 06:54:44 -05:00
parent 96c5044ac4
commit cf681d5cbb
4 changed files with 24 additions and 17 deletions

View File

@@ -619,8 +619,10 @@ var CommandLine = Module("commandline", {
return commands.lastCommand = val;
},
clear: function clear() {
this.clearMessage();
clear: function clear(scroll) {
if (!scroll || Date.now() - this._lastEchoTime > 5000)
this.clearMessage();
this._lastEchoTime = 0;
if (!this.commandSession) {
this.widgets.command = null;
@@ -754,10 +756,12 @@ var CommandLine = Module("commandline", {
}
this._lastClearable = action === this._echoLine && String(data);
this._lastEchoTime = (flags & this.FORCE_SINGLELINE) && Date.now();
if (action)
action.call(this, data, highlightGroup, single);
},
_lastEchoTime: 0,
/**
* Prompt the user. Sets modes.main to COMMAND_LINE, which the user may