-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Line wrapping breaks custom multiline problem matchers #85839
Comments
I think there's nothing we can do about this for winpty. The terminal sees that as three lines.
@Tyriar to confirm. |
Hacks on hacks! I guess we could suppress triggering the end of a line here: vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts Lines 509 to 515 in d8d87f5
By using the same end of line wrapping trick: vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts Lines 1168 to 1170 in d8d87f5
|
@alexr00 could you try add this to conditional to vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts Lines 1166 to 1168 in d8d87f5
|
Updated private _onCursorMove(): void {
const buffer = this._xterm!.buffer;
const newLine = buffer.getLine(buffer.baseY + buffer.cursorY);
if (newLine && !newLine.isWrapped) {
this._sendLineData(buffer, buffer.baseY + buffer.cursorY);
}
} But I still see the extra broken line. |
@alexr00 hmm, the fix might be a little more involved thinking about this more as linefeed hasn't fired at this point. We probably need to change this in xterm.js' window's mode to also run when the cursor is moved: Does this work just to test out the theory? Below will treat all lines > 10 chars in width as wrapped (and not send line data). private _onCursorMove(): void {
const buffer = this._xterm!.buffer;
const newLine = buffer.getLine(buffer.baseY + buffer.cursorY);
// Only send the line when the cursor is < 10
if (newLine && buffer.cursorX < 10) {
this._sendLineData(buffer, buffer.baseY + buffer.cursorY);
}
} |
@Tyriar that does solve this problem. I now just get the expected two lines and no broken lines. |
Diff: xtermjs/xterm.js@2a9e16b...fbeb45d - Adding FluffOS to xtermjs user list xtermjs/xterm.js#2663 - Flag lines as wrapped after CUP in windows mode xtermjs/xterm.js#2667 Part of #85839
@alexr00 I pulled in the change from xtermjs/xterm.js#2666, can you try it out and see if it's fixed now? (make sure you run yarn to pull in the new xterm version) |
Pulled and yarned, but I'm still seeing the extra broken line in
|
Might be related to the order of CSI handlers |
@alexr00 @Tyriar, is there any hope of progress on this? It affects the text captured by a problem matcher in weird ways, you don't even need long lines. If your window is small, it will be messed up by the wrapping of the terminal output. However, that only happens if you're viewing the terminal output. If I run a task and let it run without viewing the terminal output, the problem matcher works as expected. If I run the same task but view the terminal output while it runs, the visual wrapping done due to the small window affects the captured output by problem matchers. It seems like that's a hint in the right direction here? Can the problem matchers be run on the raw output, like when the user hasn't viewed the terminal? That way wrapping in the terminal wouldn't affect anything. |
There is hope as proper text wrapping support was added to conpty: #91898 |
@Tyriar, thanks for the info. I see that issue is from March, any vague idea on timeline of when it all might land? First half of 2021? |
@dsanders11 the linked issue says the build after 19041 which is end of 2020, start of 20221. It's not clear yet if we need to do something to adopt it (like removing our heuristics if it works). |
Closing this off as we don't plan on improving the winpty support and the issue isn't about conpty. |
Related to #32042 & #45107
Steps to Reproduce:
Observation:
Pattern tries to match only on the first part of a wrapped line
Exemple:
Wrapped output:
Resulting error:
error message
is parsed correctly but the file location is parsed asc:\a\very\long\absolute\path\to\somewhere\in\the\wo
Does this issue occur when all extensions are disabled?: Yes
EDIT: The wrapped-line parsing works correctly if a single regexp is used.
The text was updated successfully, but these errors were encountered: