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

Add custom mark API #157026

Closed
meganrogge opened this issue Aug 3, 2022 · 3 comments · Fixed by #158313
Closed

Add custom mark API #157026

meganrogge opened this issue Aug 3, 2022 · 3 comments · Fixed by #158313
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders terminal-shell-integration Shell integration infrastructure, command decorations, etc. verification-needed Verification of issue is requested verified Verification succeeded

Comments

@meganrogge
Copy link
Contributor

Requested by @connor4312 for testing purposes, we want to support registering a custom mark like:

ITerminalInstance.scrollToMark(begins: string, ends: string, highlight?: boolean)

with the sequence:

OSC 633 ; SetMark ; Id=? ; Visibility=?

We'll also need some API from terminal contrib for getting shell integration sequences.

@meganrogge meganrogge added feature-request Request for new features or functionality terminal-shell-integration Shell integration infrastructure, command decorations, etc. labels Aug 3, 2022
@meganrogge meganrogge added this to the August 2022 milestone Aug 3, 2022
@Tyriar Tyriar removed their assignment Aug 19, 2022
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 7, 2022
@Tyriar
Copy link
Member

Tyriar commented Sep 8, 2022

@connor4312 FYI this is ready to use, there's this new ITerminalInstance API:

/**
*
* @param startMarkId The ID for the start marker
* @param endMarkId The ID for the end marker
* @param highlight Whether the buffer from startMarker to endMarker
* should be highlighted
*/
scrollToMark(startMarkId: string, endMarkId?: string, highlight?: boolean): void;

Which you can use the scroll to marks with ID as set by OSC 633 ; SetMark [; Id=?] [; Hidden] ST, for example: \x1b]633;SetMark;Id=test1start;Hidden\x07

Can you link the testing issue that will use this if it exists?

@meganrogge
Copy link
Contributor Author

@connor4312 can you pls verify this?

@meganrogge meganrogge added the verification-needed Verification of issue is requested label Sep 26, 2022
@connor4312 connor4312 added the verified Verification succeeded label Sep 29, 2022
@connor4312
Copy link
Member

Seems to work well in my provisional testing 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders terminal-shell-integration Shell integration infrastructure, command decorations, etc. verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants