summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Irwin <conrad.irwin@gmail.com>2009-03-18 00:45:47 +0000
committerConrad Irwin <conrad.irwin@gmail.com>2009-03-18 00:45:47 +0000
commit238e45482cf928d89093043948a1c37a56ae961a (patch)
treee5ae3486164c123e5b82801cc4daed922e2423c9
parent924aba8f54529221cb6000aa8fa4a03d9fa4ecdc (diff)
downloadpentadactyl-238e45482cf928d89093043948a1c37a56ae961a.tar.gz
Fix bug #189, <tab><cr> now uses first completion
On discussion with maxauthority this is probably the best way of doing things for now.
-rw-r--r--common/content/ui.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/content/ui.js b/common/content/ui.js
index d01f2a2c..a23e5de7 100644
--- a/common/content/ui.js
+++ b/common/content/ui.js
@@ -1298,8 +1298,15 @@ function CommandLine() //{{{
// user pressed ENTER to carry out a command
// user pressing ESCAPE is handled in the global onEscape
// FIXME: <Esc> should trigger "cancel" event
+ // FIXME: This should not be waiting, some kind of callback mechanism on completion would be better.
if (events.isAcceptKey(key))
{
+ while (completions.context.incomplete)
+ {
+ liberator.threadYield(true);
+ command = this.command;
+ }
+
let mode = currentExtendedMode; // save it here, as modes.pop() resets it
keepCommand = true;
currentExtendedMode = null; // Don't let modes.pop trigger "cancel"