Skip to content

Commit 1fb26bc

Browse files
committed
Replace cursorLine -> terminalData
1 parent 4972322 commit 1fb26bc

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/features/terminal/utils.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,39 +64,39 @@ export async function waitForShellIntegration(terminal: Terminal): Promise<boole
6464
}
6565

6666
// Detects if the given text content appears to end with a common prompt pattern.
67-
function detectsCommonPromptPattern(cursorLine: string): boolean {
67+
function detectsCommonPromptPattern(terminalData: string): boolean {
6868
// PowerShell prompt: PS C:\> or similar patterns
69-
if (/PS\s+[A-Z]:\\.*>\s*/.test(cursorLine)) {
69+
if (/PS\s+[A-Z]:\\.*>\s*/.test(terminalData)) {
7070
return true;
7171
}
7272

7373
// Command Prompt: C:\path>
74-
if (/^[A-Z]:\\.*>\s*/.test(cursorLine)) {
74+
if (/^[A-Z]:\\.*>\s*/.test(terminalData)) {
7575
return true;
7676
}
7777

7878
// Bash-style prompts ending with $
79-
if (/\$\s*/.test(cursorLine)) {
79+
if (/\$\s*/.test(terminalData)) {
8080
return true;
8181
}
8282

8383
// Root prompts ending with #
84-
if (/#\s*/.test(cursorLine)) {
84+
if (/#\s*/.test(terminalData)) {
8585
return true;
8686
}
8787

8888
// Python REPL prompt
89-
if (/^>>>\s*/.test(cursorLine)) {
89+
if (/^>>>\s*/.test(terminalData)) {
9090
return true;
9191
}
9292

9393
// Custom prompts ending with the starship character (\u276f)
94-
if (/\u276f\s*/.test(cursorLine)) {
94+
if (/\u276f\s*/.test(terminalData)) {
9595
return true;
9696
}
9797

9898
// Generic prompts ending with common prompt characters
99-
if (/[>%]\s*/.test(cursorLine)) {
99+
if (/[>%]\s*/.test(terminalData)) {
100100
return true;
101101
}
102102

0 commit comments

Comments
 (0)