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())) 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() });