Skip to content

Is terminal.buffer._core.viewport._activeBuffer.x the right way to access the current cursor x position #4392

Answered by Tyriar
ckkMicrosoft asked this question in Q&A
Discussion options

You must be logged in to vote

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 is term.buffer.active.cursorX. The active is needed because there is a "normal" and an "alt" buffer (eg. when in vim).

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Tyriar
Comment options

@alanhg
Comment options

@Tyriar
Comment options

@alanhg
Comment options

@jerch
Comment options

Answer selected by Tyriar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #4391 on February 01, 2023 14:48.