CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

🐞 Terminal Cursor Lagging

Open thecoolwinter opened this issue 3 years ago • 1 comments

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

thecoolwinter avatar Oct 28 '22 03:10 thecoolwinter

@migueldeicaza As developer/maintainer of SwiftTerm, do you have any idea?

matthijseikelenboom avatar Jan 15 '23 20:01 matthijseikelenboom

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.

austincondiff avatar Feb 16 '23 23:02 austincondiff

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 avatar Feb 17 '23 14:02 migueldeicaza

@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!

austincondiff avatar Feb 17 '23 14:02 austincondiff

@migueldeicaza just wanted to give a quick reminder about this issue if you have some time to look into it. Thanks!

austincondiff avatar Mar 03 '23 15:03 austincondiff

@austincondiff I'm also working on this issue!

iggy890 avatar Mar 03 '23 16:03 iggy890

This also seems to be fixed once #1117 is merged

lukepistrol avatar Mar 07 '23 15:03 lukepistrol