BufferManager: protect complete_buffername from regex_error
This commit is contained in:
parent
217b3d2bce
commit
4cdddb7e6d
|
@ -65,6 +65,8 @@ CandidateList BufferManager::complete_buffername(const String& prefix,
|
|||
}
|
||||
// no prefix completion found, check regex matching
|
||||
if (result.empty())
|
||||
{
|
||||
try
|
||||
{
|
||||
Regex ex(real_prefix.begin(), real_prefix.end());
|
||||
for (auto& buffer : m_buffers)
|
||||
|
@ -74,6 +76,8 @@ CandidateList BufferManager::complete_buffername(const String& prefix,
|
|||
result.push_back(name);
|
||||
}
|
||||
}
|
||||
catch (boost::regex_error& err) {}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user