1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 10:47:59 +01:00

Fix "match n of m" getting stuck in the progress area.

This commit is contained in:
Kris Maglione
2011-02-02 16:59:37 -05:00
parent 475da7edd9
commit 6de8120d57
2 changed files with 9 additions and 7 deletions

View File

@@ -1257,6 +1257,8 @@ var CommandLine = Module("commandline", {
this.wildIndex++; this.wildIndex++;
this.preview(); this.preview();
modes.dumpStack();
util.dumpStack();
if (this.selected == null) if (this.selected == null)
statusline.progress = ""; statusline.progress = "";
else else

View File

@@ -219,18 +219,18 @@ var StatusLine = Module("statusline", {
* Any other number - The progress is cleared. * Any other number - The progress is cleared.
*/ */
progress: Modes.boundProperty({ progress: Modes.boundProperty({
set: function setProgress(progress) { get: function progress() this._progress,
if (!progress) set: function progress(progress) {
progress = ""; this._progress = progress || "";
if (typeof progress == "string") if (typeof progress == "string")
this.widgets.progress.value = progress; this.widgets.progress.value = this._progress;
else if (typeof progress == "number") { else if (typeof progress == "number") {
let progressStr = ""; let progressStr = "";
if (progress <= 0) if (this._progress <= 0)
progressStr = "[ Loading... ]"; progressStr = "[ Loading... ]";
else if (progress < 1) { else if (this._progress < 1) {
progress = Math.round(progress * 20); let progress = Math.round(this._progress * 20);
progressStr = "[" progressStr = "["
+ "===================> " + "===================> "
.substr(20 - progress, 20) .substr(20 - progress, 20)