🐞 Terminal Cursor Lagging
Description
The terminal's cursor appears to lag when the view's layout changes.
This may be an issue with the terminal emulator we're using but this issue can be used to track progress if that turns out to be the case.
To Reproduce
- Open the terminal
- Execute any command
- Modify the size of the terminal this is easier to see if you do it abruptly
- The cursor should lag behind the rest of the view's text and even bleed out into the rest of the view hierarchy
Expected behavior
The cursor should stay on the correct line in the terminal when the size changes and should not lag behind.
Version information
CodeEdit: 1.0 (1) Commit: b3581e38e48341f660b25a9b6048a540d570e9f8 MacOS: 12.6 (21G115) Xcode: 14.0.1 (14A400)
Additional context
https://user-images.githubusercontent.com/35942988/198494644-c5d04928-def7-4217-a5a8-57f349b30aab.mov
@migueldeicaza As developer/maintainer of SwiftTerm, do you have any idea?
I just reached out to @migueldeicaza for insight into this. We will see if we can get a response from him. If not we may need to try asking in an issue in the SwiftTerm repo or even submitting a PR ourselves.
Hello!
Thanks for reaching out over email. Sadly, the GitHub notifications are so many that I filter those out, so I miss those.
This is indeed a bug, it is not really a lag issue, it is an out-of-sync issue between the code that computes the cursor view and the buffer that render the contents.
Some weeks ago (or months?) I fixed this issue on iOS, and might have not updated the Mac backend. I am sadly unavailable for the next 10 days to look into this, but if you are in a rush the comments above l can give you a directional idea of where the bug lies and a possible similar fix
@migueldeicaza thank you for the response and the additional clarification! CodeEdit is not yet in production so we can be patient and wait 10 days. Please let us know here when you can get this fixed. Thanks again!
@migueldeicaza just wanted to give a quick reminder about this issue if you have some time to look into it. Thanks!
@austincondiff I'm also working on this issue!
This also seems to be fixed once #1117 is merged