From d8d92aa8da98afbf70929fed2611f77eaf540ed3 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 2 Dec 2008 09:26:34 +0000 Subject: [PATCH] Fix wim= --- content/template.js | 2 +- content/ui.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/content/template.js b/content/template.js index 1a070f30..b3c832fa 100644 --- a/content/template.js +++ b/content/template.js @@ -81,7 +81,7 @@ const template = { icon: function (item, text) { let icon = this.getKey(item, "icon"); - return <>{icon ? : <>}{text} + return <>{icon ? : <>}{text} }, filter: function (str) {str}, diff --git a/content/ui.js b/content/ui.js index ec2c8383..1f23a21d 100644 --- a/content/ui.js +++ b/content/ui.js @@ -133,9 +133,10 @@ function CommandLine() //{{{ let wildmode = options.get("wildmode"); let wildType = wildmode.values[Math.min(wildIndex++, wildmode.values.length - 1)]; + let first = wildmode.value == ""; let hasList = wildmode.checkHas(wildType, "list"); let longest = wildmode.checkHas(wildType, "longest"); - let full = !longest && wildmode.checkHas(wildType, "full"); + let full = first || !longest && wildmode.checkHas(wildType, "full"); // we need to build our completion list first if (completionIndex == UNINITIALIZED || completionContext.waitingForTab) @@ -166,7 +167,9 @@ function CommandLine() //{{{ } } - if (full) + if (first) + completionIndex = 0; + else if (full) { if (event.shiftKey) completionIndex--;