From 0033491d69d4d7d16731c79da2bfbea85361ddd1 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 9 Dec 2017 22:03:19 +1100 Subject: [PATCH] InsertCompleter: Respected ignored_filename option in filename completer --- src/insert_completer.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/insert_completer.cc b/src/insert_completer.cc index 95d2713dd..6ab651ba2 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())) 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())) { StringView candidate = filename.substr(dir.length()); candidates.push_back({ candidate.str(), "", candidate.str() });