From d93e75aea222edbc8e4d31a040a738ed17ddeaaa Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 27 Nov 2008 12:04:15 +0000 Subject: [PATCH] Dont try to preview a substring when no completion context --- content/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/ui.js b/content/ui.js index 36de8af0..f002bf0f 100644 --- a/content/ui.js +++ b/content/ui.js @@ -308,7 +308,7 @@ function CommandLine() //{{{ function previewSubstring() { - if (!options.get("wildoptions").has("auto")) + if (!options.get("wildoptions").has("auto") || !completionContext) return; // Kludge. Major kludge. let editor = commandWidget.inputField.editor; @@ -818,7 +818,6 @@ function CommandLine() //{{{ onEvent: function onEvent(event) { - let command = this.getCommand(); let editor = commandWidget.inputField.editor; try { @@ -826,6 +825,7 @@ function CommandLine() //{{{ editor.deleteNode(node.firstChild.nextSibling); } catch (e) {} + let command = this.getCommand(); if (event.type == "blur") {