file completion: disable ignored files when entered prefix matches.
This commit is contained in:
parent
902ae9ce45
commit
bc1a90d4f5
|
@ -47,13 +47,16 @@ CandidateList complete_filename(const Context& context,
|
||||||
if (not dir)
|
if (not dir)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
const bool check_ignored_files = not ignored_files.empty() and
|
||||||
|
not boost::regex_match(fileprefix.c_str(), ignored_files_regex);
|
||||||
|
|
||||||
while (dirent* entry = readdir(dir))
|
while (dirent* entry = readdir(dir))
|
||||||
{
|
{
|
||||||
String filename = entry->d_name;
|
String filename = entry->d_name;
|
||||||
if (filename.empty())
|
if (filename.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (not ignored_files.empty() and
|
if (check_ignored_files and
|
||||||
boost::regex_match(filename.c_str(), ignored_files_regex))
|
boost::regex_match(filename.c_str(), ignored_files_regex))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user