Apply review suggestion

This commit is contained in:
Octavia Togami 2024-08-20 17:48:21 -07:00
parent d05e84268b
commit 8a3df24a37

View File

@ -227,8 +227,7 @@ private static Substring onlyOnLastQuotedWord(Substring lastArg, Substring sugge
return suggestion;
}
String substr = suggestion.getSubstring();
// Ignore if suggestion ends with a " ", since that signals the end of
// the completed command.
// Check if there is a space inside the substring, and suggest starting from there instead.
int sp = substr.trim().lastIndexOf(' ');
if (sp < 0) {
return suggestion;