Fix attr path completion after a dot

This commit is contained in:
Naïm Favier 2021-12-22 16:37:58 +01:00
parent 1da1b2b345
commit c4a03bc4ae
No known key found for this signature in database
GPG Key ID: 49B07322580B7EE2

View File

@ -191,7 +191,7 @@ void SourceExprCommand::completeInstallable(std::string_view prefix)
auto sep = prefix_.rfind('.');
std::string searchWord;
if (sep != std::string::npos) {
searchWord = prefix_.substr(sep, std::string::npos);
searchWord = prefix_.substr(sep + 1, std::string::npos);
prefix_ = prefix_.substr(0, sep);
} else {
searchWord = prefix_;