Repository navigation
Custom cursor shaders don't have their previous positions set intuitively #10981
2026-02-24.18-50-18.mp4In the above video I have a cursor trail effect enabled, which should mark a change in position of the cursor visually. However, with the way current/previous cursor positions are handled, the trail often appears in useless ways --- for example, when the I think a better solution would be to debounce the cursor position until it's been stable for a while, and only then trigger change the current and old cursor positions. An additional problem is that when the command is input at the bottom of the screen, the output and new shell prompt are automatically scrolled into view but the previous cursor position isn't actually scrolled with it, making the trail come from thin air. The cursor's previous position should also be scrolled along with it. I've made a few hacky edits to ghostty that implement these changes at https://github.com/Koranir/ghostty/tree/shader-cursor-adjustments, so here's a video: 2026-02-24.19-02-39.mp4This just uses a 10ms debounce, which I think adds a 10ms delay to rendering the cursor position (input itself is unchanged), which could be avoided by only updating the previous cursor position maybe? |
Replies: 3 comments
|
!vouch |
|
@Koranir - what shader are you using for your cursor trail effect? |
Accepted as #10995, I think debouncing makes sense.