-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
ITerminalInstance.onData should be higher level #18453
Comments
Oh I thought you mentioned you wanted to include escape sequences? You just want line by line data with escape sequences stripped then? Line number is not an easy thing to convey as the buffer continually gets trimmed to adhere to the terminal's scrollback. |
Yes, line by line with escape sequence stripped would be perfect. I don't necessarily need a line number a sort of line ID would help as well to determine if a line has changed in regards to a previous line. That would allow to determine if an computed problem needs to be invalidated. |
@dbaeumer RE line ID: Does this line rewriting happen with any compilers/linters you know? In my experience they typically just print new lines. |
@Tyriar agree that they typically print new lines. But if not there is no way for the matcher to detect this if we don't have some sort of id. |
The current solution is working fine for now so closing this off. |
@Tyriar I try to use the terminal.onData(data => ...) in an extension
|
@BartNetJS this is an internal API so it's not available to extensions. We're not sure currently whether we want to expose this to extensions as there are security and performance considerations to take into account. |
Not sure why this was locked but #13337 might be what you're after. |
The callback trigger on ITerminalInstance.onData() receives a string containing the raw pty output including the ANSI Control characters. Although this might be useful for some clients I think the majority is not interested in ANSI Control characters since the interpretation is not easy. I therefore suggest that the terminal provide two different listeners. One raw listener that includes the data like it is today and one line based listener that fires if
The event should contain the line number as well.
The text was updated successfully, but these errors were encountered: