Skip to content

Commit b5c060c

Browse files
authored
fix: suggestion appears and hangs after enter (#236)
Signed-off-by: Chapman Pendery <cpendery@vt.edu>
1 parent aa21436 commit b5c060c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ui/suggestionManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ export class SuggestionManager {
161161

162162
update(keyPress: KeyPress): boolean {
163163
const { name, shift, ctrl } = keyPress;
164+
if (name == "return") {
165+
this.#term.clearCommand(); // clear the current command on enter
166+
}
164167
if (!this.#suggestBlob) {
165168
return false;
166169
}
@@ -186,9 +189,6 @@ export class SuggestionManager {
186189
}
187190
this.#term.write(removals + chars);
188191
} else {
189-
if (name == "return") {
190-
this.#term.clearCommand(); // clear the current command on enter
191-
}
192192
return false;
193193
}
194194
log.debug({ msg: "handled keypress", ...keyPress });

0 commit comments

Comments
 (0)