aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzyMode.js
diff options
context:
space:
mode:
authorPhil Crosby2012-04-29 21:33:26 -0700
committerPhil Crosby2012-04-29 21:33:26 -0700
commite81f8c7e82611d5ee7e32dec6a3a0bdc546da414 (patch)
tree3e471dc1bd67911e52dca7f2a63c23c6038da629 /fuzzyMode.js
parenta1af6bedf1daa378970e62ebaf55301e7539eb2e (diff)
downloadvimium-e81f8c7e82611d5ee7e32dec6a3a0bdc546da414.tar.bz2
Rename reverseAction and alternative to simply "open in new tab".
The genericism is not helping.
Diffstat (limited to 'fuzzyMode.js')
-rw-r--r--fuzzyMode.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/fuzzyMode.js b/fuzzyMode.js
index b6520e36..c7b5b082 100644
--- a/fuzzyMode.js
+++ b/fuzzyMode.js
@@ -9,14 +9,14 @@ var fuzzyMode = (function() {
}
/** Trigger the fuzzy mode dialog */
- function start(name, reverseAction, refreshInterval) {
+ function start(name, refreshInterval) {
var completer = getCompleter(name);
if (!fuzzyBox)
fuzzyBox = new FuzzyBox(10);
completer.refresh();
fuzzyBox.setCompleter(completer);
fuzzyBox.setRefreshInterval(refreshInterval);
- fuzzyBox.show(reverseAction);
+ fuzzyBox.show();
}
/** User interface for fuzzy completion */
@@ -36,8 +36,7 @@ var fuzzyMode = (function() {
this.refreshInterval = refreshInterval;
},
- show: function(reverseAction) {
- this.reverseAction = reverseAction;
+ show: function() {
this.box.style.display = 'block';
this.input.focus();
handlerStack.push({ keydown: this.onKeydown.bind(this) });
@@ -97,10 +96,8 @@ var fuzzyMode = (function() {
// (opening in new tab)
else if (event.keyCode == keyCodes.enter) {
this.update(true, function() {
- var alternative = (event.shiftKey || isPrimaryModifierKey(event));
- if (self.reverseAction)
- alternative = !alternative;
- self.completions[self.selection].action[alternative ? 1 : 0]();
+ var openInNewTab = (event.shiftKey || isPrimaryModifierKey(event));
+ self.completions[self.selection].action[openInNewTab ? 1 : 0]();
self.hide();
});
}