1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 21:37:58 +01:00

many bug fixes, :cd and :pwd commands, ~ mapping

This commit is contained in:
Martin Stubenschrott
2007-11-20 00:40:40 +00:00
parent da34b3dc81
commit 678a5657fd
6 changed files with 118 additions and 29 deletions

View File

@@ -190,12 +190,12 @@ vimperator.Completion = function () //{{{
{
if (cpt[i] == "s")
completions = completions.concat(this.search(filter)[1]);
else if (cpt[i] == "f")
completions = completions.concat(this.file(filter, false)[1]);
else if (cpt[i] == "b")
completions = completions.concat(vimperator.bookmarks.get(filter));
else if (cpt[i] == "h")
completions = completions.concat(vimperator.history.get(filter));
else if (cpt[i] == "f")
completions = completions.concat(this.file(filter, false)[1]);
}
return [start, completions];
@@ -237,7 +237,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 [[short ? file.leafName : (dir + file.leafName)], file.isDirectory() ? "Directory" : "File"];
});
}
catch (e)
@@ -245,7 +245,10 @@ vimperator.Completion = function () //{{{
return [];
}
return [short ? dir.length : 0, buildLongestStartingSubstring(mapped, compl)];
if (short)
return [dir.length, buildLongestStartingSubstring(mapped, compl)];
else
return [0, buildLongestStartingSubstring(mapped, filter)];
},
help: function (filter)