Skip to content

Commit 48262cd

Browse files
committed
fix: suggest widget persisting on completion acceptance
Signed-off-by: Chapman Pendery <[email protected]>
1 parent cf216ec commit 48262cd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalSuggestAddon.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,12 @@ export class SuggestAddon extends Disposable implements ITerminalAddon, ISuggest
425425
}
426426
// Right
427427
if (data === '\x1b[C') {
428-
handled = true;
429-
this._cursorIndexDelta += 1;
430-
handledCursorDelta++;
428+
// If right requests beyond where the completion was requested (potentially accepting a shell completion), hide
429+
if (this._additionalInput?.length !== this._cursorIndexDelta) {
430+
handled = true;
431+
this._cursorIndexDelta++;
432+
handledCursorDelta++;
433+
}
431434
}
432435
if (data.match(/^[a-z0-9]$/i)) {
433436

0 commit comments

Comments
 (0)