diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-12-09 22:03:19 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-12-09 22:03:19 +1100 |
| commit | 0033491d69d4d7d16731c79da2bfbea85361ddd1 (patch) | |
| tree | f15b40a07be03e147f7ca418b41f0d51d5f02f73 /src | |
| parent | a33d18e125e21820ad01580342a708d62c09973f (diff) | |
InsertCompleter: Respected ignored_filename option in filename completer
Diffstat (limited to 'src')
| -rw-r--r-- | src/insert_completer.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/insert_completer.cc b/src/insert_completer.cc index 95d2713d..6ab651ba 100644 --- a/src/insert_completer.cc +++ b/src/insert_completer.cc @@ -226,7 +226,8 @@ InsertCompletion complete_filename(const SelectionList& sels, InsertCompletion::CandidateList candidates; if (prefix.front() == '/' or prefix.front() == '~') { - for (auto& filename : Kakoune::complete_filename(prefix, Regex{})) + for (auto& filename : Kakoune::complete_filename(prefix, + options["ignored_files"].get<Regex>())) candidates.push_back({ filename, "", filename }); } else @@ -235,7 +236,8 @@ InsertCompletion complete_filename(const SelectionList& sels, { if (not dir.empty() and dir.back() != '/') dir += '/'; - for (auto& filename : Kakoune::complete_filename(dir + prefix, Regex{})) + for (auto& filename : Kakoune::complete_filename(dir + prefix, + options["ignored_files"].get<Regex>())) { StringView candidate = filename.substr(dir.length()); candidates.push_back({ candidate.str(), "", candidate.str() }); |
