fix: completion fails to detect space when represented with cursor movement (#116)

Signed-off-by: Chapman Pendery <cpendery@vt.edu>
This commit is contained in:
Chapman Pendery
2023-12-13 12:53:58 -08:00
committed by GitHub
parent da328aa9b7
commit fd7866ecde
+4 -2
View File
@@ -205,10 +205,12 @@ export class CommandManager {
for (let i = lineY == promptEndMarker.line ? this.#activeCommand.promptText.length : 0; i < this.#terminal.cols; i++) {
const cell = line?.getCell(i);
if (cell == null) continue;
const chars = cell.getChars();
const cleanedChars = chars == "" ? " " : chars;
if (!this._isSuggestion(cell) && suggestions.length == 0) {
command += cell.getChars();
command += cleanedChars;
} else {
suggestions += cell.getChars();
suggestions += cleanedChars;
}
}
lineY += 1;