Replies: 1 comment
-
@arcanis What do you mean with:
Can you explain more in detail, where the data comes from? How is xterm.js involved here? My guess currently goes into the direction, that you want to use xterm.js for the multiplexed sub terminals. That should be possible with Since you ask for internal APIs - most buffer related things are under
Reading buffer data down to cell level is also exposed on the official public API (preferable, unless you dont mind hard linking against a certain minor version of xterm.js). Cell writing is not exposed, to see how thats done, see xterm.js/src/common/InputHandler.ts Lines 507 to 647 in 1da0db4 |
Beta Was this translation helpful? Give feedback.
-
I was thinking to use xterm.js to power a multiplexer in a terminal UI library, but I'm not entirely sure what's the best way to achieve that (with "best" being "most correct but simple"). In short, I have to implement a
renderLine
function that, given a line number, returns the ansi sequence to render this line. I did a first attempt by using@xterm/addon-serialize
, but it cannot run tools likeemacs
properly - I suspect the addon is returning terminal sequences that aren't limited to pure rendering.My second idea was to use a custom renderer (similar to the canvas / webgl ones), but I looked at the code and they both seem very complex. I'd have expected a way to ask for xterm.js the set of characters and style to apply on every cell from a given range, but I didn't find how to do that just yet. Did I miss some internal API?
Beta Was this translation helpful? Give feedback.
All reactions