fix: suggest widget persisting on completion acceptance

Signed-off-by: Chapman Pendery <cpendery@microsoft.com>
This commit is contained in:
Chapman Pendery 2024-03-23 22:13:57 -07:00
parent cf216ecd5a
commit 48262cda12

View file

@ -425,9 +425,12 @@ export class SuggestAddon extends Disposable implements ITerminalAddon, ISuggest
}
// Right
if (data === '\x1b[C') {
handled = true;
this._cursorIndexDelta += 1;
handledCursorDelta++;
// If right requests beyond where the completion was requested (potentially accepting a shell completion), hide
if (this._additionalInput?.length !== this._cursorIndexDelta) {
handled = true;
this._cursorIndexDelta++;
handledCursorDelta++;
}
}
if (data.match(/^[a-z0-9]$/i)) {