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

Show all valid hints on tab. Closes issue #339.

This commit is contained in:
Kris Maglione
2011-01-31 20:36:36 -05:00
parent ee951d130e
commit cef42479df
2 changed files with 4 additions and 3 deletions

View File

@@ -621,10 +621,10 @@ var HintSession = Class("HintSession", CommandMode, {
return Events.KILL; return Events.KILL;
}, },
updateValidNumbers: function updateValidNumbers() { updateValidNumbers: function updateValidNumbers(always) {
let string = this.getHintString(this.hintNumber); let string = this.getHintString(this.hintNumber);
for (let hint in values(this.validHints)) for (let hint in values(this.validHints))
hint.valid = hint.span.getAttribute("number").indexOf(string) == 0; hint.valid = always || hint.span.getAttribute("number").indexOf(string) == 0;
}, },
tab: function tab(previous) { tab: function tab(previous) {
@@ -643,6 +643,7 @@ var HintSession = Class("HintSession", CommandMode, {
this.hintNumber = this.validHints.length; this.hintNumber = this.validHints.length;
} }
this.updateValidNumbers(true);
this.showActiveHint(this.hintNumber, oldId); this.showActiveHint(this.hintNumber, oldId);
this.updateStatusline(); this.updateStatusline();
}, },

View File

@@ -305,7 +305,7 @@ var File = Class("File", {
return File.DoesNotExist(path, e); return File.DoesNotExist(path, e);
} }
} }
let self = XPCSafeJSObjectWrapper(file); let self = XPCSafeJSObjectWrapper(file.QueryInterface(Ci.nsILocalFile));
self.__proto__ = this; self.__proto__ = this;
return self; return self;
}, },