Ghost text for high-latency terminal sessions #5975
-
ghost-text.movSomething similar to this xterm.js behavior would be nice. Any plans to support this? I searched for this feature in docs/issues/discussions but couldn't find it. Apologies if this is already supported/being discussed somewhere. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Possibly relevant: #1934 (comment). |
Beta Was this translation helpful? Give feedback.
-
xtermjs/xterm.js#887 (it seems it has multiple forks to continue the work I saw at least 2 not sure if any are still active) this seems very similar if not the thing you are asking for. Id say this is probably very out of scope for ghostty at least for along time as it basically means ghostty now has to run a mini shell to understand what specific shell sequences mean etc. TL;DR if its not a ghostty keybind nor a escape seqence a terminal doesn't really know about the data it just passes it to the shell and the shell tells the terminal what to do like move cursor left or print the letter a here etc it also means ghostty has to have 2 internal buffers, text in the scrollback and now text its waiting for a response from the shell from which if it was somehow wrong it needs to fix. I would think this would be pretty expensive speed wise to manage properly This is not a "easy" feature to add due to both things I mentioned Maybe like xterm.js this would be better suited as a plugin to |
Beta Was this translation helpful? Give feedback.
-
I will just add this is default behavior in VS Code/Cursor terminal so a lot of users will expect it. |
Beta Was this translation helpful? Give feedback.
-
I'm going to reject this for now for multiple reasons:
I'm not saying this is a bad idea per se, but it's something that needs a complete overhaul of our rendering system and tighter integration with every part of the chain, and while we can achieve the former (indeed, it's on the roadmap) the latter is much harder to ask for outside of a tightly integrated environment like VS Code. It's just not feasible for SSH to concern itself with what specific terminal emulators do. |
Beta Was this translation helpful? Give feedback.
I'm going to reject this for now for multiple reasons:
Firstly, we don't have a builtin way of measuring what latency is, and figuring that out is completely out of the scope of a terminal emulator: it should be either the task of SSH or another tool that works closely with it.
Secondly, even if we were to implement this, we would need to support animations that don't compromise performance. That's not currently possible as the graphics pipeline is synced to terminal cell rebuilding, and that is very slow and resource-intensive. (There's a reason why
custom-shader-animation
is off by default.)I'm not saying this is a bad idea per se, but it's something that needs a complete overhau…