We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc221fa commit b7ebab6Copy full SHA for b7ebab6
1 file changed
src/features/terminal/utils.ts
@@ -44,16 +44,16 @@ export async function waitForShellIntegration(terminal: Terminal): Promise<boole
44
45
// Condition 3: Detect prompt patterns in terminal output
46
new Promise<boolean>((resolve) => {
47
- let dataSoFar = '';
+ const dataEvents: string = [];
48
const debounced = createSimpleDebounce(50, () => {
49
- if (dataSoFar && detectsCommonPromptPattern(dataSoFar)) {
+ if (dataEvents && detectsCommonPromptPattern(dataEvents.join(''))) {
50
resolve(false);
51
}
52
});
53
disposables.push(
54
onDidWriteTerminalData((e) => {
55
if (e.terminal === terminal) {
56
- dataSoFar += e.data;
+ dataEvents.push(e.data);
57
debounced.trigger();
58
59
}),
0 commit comments