Is terminal.buffer._core.viewport._activeBuffer.x the right way to access the current cursor x position #4392
-
This is a wonderful library :) .. I love how easy it was for me to get up and running! I'd really appreciate some help here. The examples on the net indicate that I should be able to use term.buffer.cursorX to get the current x position but it seems that the latest code has changed and its no longer supported. I was able to access the x position by trial and error but the underscores make me think that this may not be the right way. Is there a right way to get the cursor position or has there been a regression? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
As an embedder you should never reach into anything not specified in xterm.d.ts like |
Beta Was this translation helpful? Give feedback.
As an embedder you should never reach into anything not specified in xterm.d.ts like
_core
, as that's getting into private API that can change at any time. The right way to access the cursor x isterm.buffer.active.cursorX
. The active is needed because there is a "normal" and an "alt" buffer (eg. when in vim).