Skip to content

Commit f28c508

Browse files
committed
Clear cursor and ghost text when setting command line via sequence
1 parent de1b891 commit f28c508

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ export class PromptInputModel extends Disposable implements IPromptInputModel {
114114
setConfidentCommandLine(value: string): void {
115115
if (this._value !== value) {
116116
this._value = value;
117+
this._cursorIndex = -1;
118+
this._ghostTextIndex = -1;
117119
this._onDidChangeInput.fire(this._createStateObject());
118120
}
119121
}
@@ -159,7 +161,6 @@ export class PromptInputModel extends Disposable implements IPromptInputModel {
159161
this._onDidInterrupt.fire(event);
160162
}
161163

162-
163164
this._state = PromptInputState.Execute;
164165
this._onDidFinishInput.fire(event);
165166
this._onDidChangeInput.fire(event);

0 commit comments

Comments
 (0)