Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make registerMarker's cursor offset optional #3611

Closed
Tyriar opened this issue Jan 21, 2022 · 1 comment
Closed

Make registerMarker's cursor offset optional #3611

Tyriar opened this issue Jan 21, 2022 · 1 comment
Labels
area/api good first issue help wanted type/enhancement Features or improvements to existing features

Comments

@Tyriar
Copy link
Member

Tyriar commented Jan 21, 2022

We've been using markers more and more in xterm.js and found that every case so far looks like registerMarker(0)

We should make the argument optional and have it imply 0 (same line as the cursor).

xterm.js/typings/xterm.d.ts

Lines 860 to 866 in 6c18b7f

/**
* (EXPERIMENTAL) Adds a marker to the normal buffer and returns it. If the
* alt buffer is active, undefined is returned.
* @param cursorYOffset The y position offset of the marker from the cursor.
* @returns The new marker or undefined.
*/
registerMarker(cursorYOffset: number): IMarker | undefined;

@Tyriar
Copy link
Member Author

Tyriar commented Dec 15, 2022

This is done

xterm.js/typings/xterm.d.ts

Lines 943 to 949 in 1c7c4eb

/**
* Adds a marker to the normal buffer and returns it. If the alt buffer is
* active, undefined is returned.
* @param cursorYOffset The y position offset of the marker from the cursor.
* @returns The new marker or undefined.
*/
registerMarker(cursorYOffset?: number): IMarker | undefined;

@Tyriar Tyriar closed this as completed Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api good first issue help wanted type/enhancement Features or improvements to existing features
Projects
None yet
Development

No branches or pull requests

1 participant