From 6ceccfee7213ec265df2b77866694723702285cc Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 4 Dec 2007 08:21:38 +0000 Subject: [PATCH] rename completion#files "short" parameter to "tail" --- content/completion.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/completion.js b/content/completion.js index 7c876641..35ffae25 100644 --- a/content/completion.js +++ b/content/completion.js @@ -219,8 +219,8 @@ vimperator.Completion = function () //{{{ // TODO: support file:// and \ or / path separators on both platforms // TODO: sort directories first - // if "short" is true, only return names without any directory components - file: function (filter, short) + // if "tail" is true, only return names without any directory components + file: function (filter, tail) { // this is now also used as part of the url completion, so the // substrings shouldn't be cleared for that case @@ -240,7 +240,7 @@ vimperator.Completion = function () //{{{ { files = vimperator.io.readDirectory(dir); mapped = files.map(function (file) { - return [[short ? file.leafName : (dir + file.leafName)], file.isDirectory() ? "Directory" : "File"]; + return [[tail ? file.leafName : (dir + file.leafName)], file.isDirectory() ? "Directory" : "File"]; }); } catch (e) @@ -248,7 +248,7 @@ vimperator.Completion = function () //{{{ return []; } - if (short) + if (tail) return [dir.length, buildLongestStartingSubstring(mapped, compl)]; else return [0, buildLongestStartingSubstring(mapped, filter)];