-
Notifications
You must be signed in to change notification settings - Fork 852
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
Regression: mouse support broken in Visual Studio Code terminal #5547
Comments
I tested on macOS with 1.97.2 (broken) and Windows with 1.96.2 (working fine!) and 1.97.2 (also fine). So the problem seems limited to macOS. |
I see the issue. It is a bug in Textual. Fix incoming. |
That is very nice, thanks! |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Works as a charm, thank you very much! |
2.0.4 did not helped me for iterm + ssh tunnel. pip install textual==1.0.0 Without ssh tunnel - everything is fine. Not sure how to troubleshoot the ssh.
Note: @willmcgugan , is it the same issue or should I report new one? |
I can confirm on my Raspberry Pi. VS Code + ssh works fine, Ghostty + ssh works fine, iTerm2 + ssh is broken in a very similar fashion to the original issue with the VS Code terminal. |
When you SSH, what does the env var |
this value - does not exist for me, under ssh. vs localhost
|
|
But the |
Looks like an easy fix. Just need to detect iTerm via LC_TERMINAL |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Can confirm that mouse support on SSH over iTerm2 works again! 🎉 |
Mouse support is broken in the VS Code terminal. When you click on a widget, that widget is not focused. Worse, if it was focused using keyboard shortcuts, it will be blurred. It turns out that the mouse coordinates are incorrectly calculated and that if you move your mouse over the top-left corner of the terminal, the reported mouse coordinates cover the entire area. So the exact top-left is reported as (0.0, 0.0, but if you move a bit to the right and a bit down it already reports (17.0, 12.0) and so on.
I ran a git bisect and the offending commit is (unsurprisingly) 9f18dfe (smooth scrolling). I tested using this code:
I ran
textual diagnose
in that same terminal:The text was updated successfully, but these errors were encountered: