mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Disable buffer completion when there is no prefix/suffix
We still enable it when a custom completion command provides us with completion candidates. For example user might hit escape in a context where a file name should be inserted, without providing any initial prefix or suffix (as the number of expected candidates is small).
This commit is contained in:
@@ -113,6 +113,9 @@ namespace ng
|
||||
}
|
||||
}
|
||||
|
||||
if(commandResult.empty() && prefix.empty() && suffix.empty())
|
||||
return { };
|
||||
|
||||
for(ssize_t i = 0; i < commandResult.size(); ++i)
|
||||
tmp.push_back(std::make_pair(-commandResult.size() + i, commandResult[i]));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user