summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2011-07-14 02:02:16 +1000
committerDoug Kearns <dougkearns@gmail.com>2011-07-14 02:02:16 +1000
commitd734bf42af6e54407c0cc40935f54e2d85ae9113 (patch)
treef2f5042a8e374cdea9107e836b4556b9d8685be9 /common
parentd0a70332b63eea14b97053fe25a74320d0109276 (diff)
downloadpentadactyl-d734bf42af6e54407c0cc40935f54e2d85ae9113.tar.gz
Allow full path names to be matched by 'wildignore'.
Closes issue #567.
Diffstat (limited to 'common')
-rw-r--r--common/locale/en-US/options.xml5
-rw-r--r--common/modules/io.jsm8
2 files changed, 6 insertions, 7 deletions
diff --git a/common/locale/en-US/options.xml b/common/locale/en-US/options.xml
index bf45d564..bace1f07 100644
--- a/common/locale/en-US/options.xml
+++ b/common/locale/en-US/options.xml
@@ -1613,8 +1613,9 @@
<default>&option.wildignore.default;</default>
<description>
<p>
- List of file patterns to ignore when completing files. For example,
- the following will ignore object files and Vim swap files:
+ List of path name patterns to ignore when completing files and
+ directories. For example, the following will ignore object files
+ and Vim swap files:
</p>
<set opt="wildignore"><str delim="'">\.o$</str>,<str delim="'">^\..*\.s[a-z]{2}$</str></set>
diff --git a/common/modules/io.jsm b/common/modules/io.jsm
index 81b7c001..065da969 100644
--- a/common/modules/io.jsm
+++ b/common/modules/io.jsm
@@ -907,10 +907,8 @@ unlet s:cpo_save
};
context.compare = function (a, b) b.isdir - a.isdir || String.localeCompare(a.text, b.text);
- if (modules.options["wildignore"]) {
- let wig = modules.options.get("wildignore");
- context.filters.push(function (item) item.isdir || !wig.getKey(item.path));
- }
+ if (modules.options["wildignore"])
+ context.filters.push(function (item) !modules.options.get("wildignore").getKey(item.path));
// context.background = true;
context.key = dir;
@@ -1077,7 +1075,7 @@ unlet s:cpo_save
options["shellcmdflag"];
options.add(["wildignore", "wig"],
- "List of file patterns to ignore when completing file names",
+ "List of path name patterns to ignore when completing files and directories",
"regexplist", "");
}
});