mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-21 23:59:34 +01:00
Merge pull request #210782 from microsoft/tyriar/more_input_model
Enforce maximum adjust marker poll count
This commit is contained in:
@@ -114,6 +114,8 @@ export class PromptInputModel extends Disposable implements IPromptInputModel {
|
||||
setConfidentCommandLine(value: string): void {
|
||||
if (this._value !== value) {
|
||||
this._value = value;
|
||||
this._cursorIndex = -1;
|
||||
this._ghostTextIndex = -1;
|
||||
this._onDidChangeInput.fire(this._createStateObject());
|
||||
}
|
||||
}
|
||||
@@ -165,7 +167,6 @@ export class PromptInputModel extends Disposable implements IPromptInputModel {
|
||||
this._onDidInterrupt.fire(event);
|
||||
}
|
||||
|
||||
|
||||
this._state = PromptInputState.Execute;
|
||||
this._onDidFinishInput.fire(event);
|
||||
this._onDidChangeInput.fire(event);
|
||||
|
||||
@@ -555,7 +555,7 @@ class UnixPtyHeuristics extends Disposable {
|
||||
const enum AdjustCommandStartMarkerConstants {
|
||||
MaxCheckLineCount = 10,
|
||||
Interval = 20,
|
||||
MaximumPollCount = 50,
|
||||
MaximumPollCount = 10,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -736,7 +736,7 @@ class WindowsPtyHeuristics extends Disposable {
|
||||
}
|
||||
if (scannedLineCount < AdjustCommandStartMarkerConstants.MaxCheckLineCount) {
|
||||
this._tryAdjustCommandStartMarkerScannedLineCount = scannedLineCount;
|
||||
if (this._tryAdjustCommandStartMarkerPollCount < AdjustCommandStartMarkerConstants.MaximumPollCount) {
|
||||
if (++this._tryAdjustCommandStartMarkerPollCount < AdjustCommandStartMarkerConstants.MaximumPollCount) {
|
||||
this._tryAdjustCommandStartMarkerScheduler?.schedule();
|
||||
} else {
|
||||
this._flushPendingHandleCommandStartTask();
|
||||
|
||||
Reference in New Issue
Block a user