Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't request terminal completions if cursor index < 0 #238385

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

meganrogge
Copy link
Contributor

fix #238380

@meganrogge meganrogge requested a review from Tyriar January 21, 2025 17:38
@meganrogge meganrogge self-assigned this Jan 21, 2025
@meganrogge meganrogge added this to the January 2025 milestone Jan 21, 2025
@meganrogge meganrogge enabled auto-merge (squash) January 21, 2025 17:38
@meganrogge
Copy link
Contributor Author

meganrogge commented Jan 21, 2025

After a command is executed, we set it to -1. When there's next input, if there's prompt input detection IE shell integration, we set the value again. Thus, when it's set to -1, it means we do not have knowledge of where the cursor is.

Running ls then typing a char, which is detected bc shell integration still works

Screenshot 2025-01-21 at 2 25 45 PM

Running bash then typing a char, which is not detected bc no shell integration is present, so it remains -1

Screenshot 2025-01-21 at 2 26 34 PM

@meganrogge meganrogge merged commit 9542cdb into main Jan 21, 2025
8 checks passed
@meganrogge meganrogge deleted the merogge/fix-issue2 branch January 21, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

can trigger terminal suggest even without shell integration
2 participants