-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Terminal can lock up when typing if the cursor is hovering a link #4341
Comments
Looks like the cause is that any viewport change registers a new event listener that only gets disposed when the original link is disposed: xterm.js/src/browser/Linkifier2.ts Line 314 in 3a74930
|
This only happens when the link is on a different line to the cursor. This clear call doesn't end up clearing the old link otherwise, which is where the leak happens: xterm.js/src/browser/Linkifier2.ts Line 319 in 3a74930
Changing this to xterm.js/src/browser/Linkifier2.ts Line 324 in 3a74930
https://github.com/Tyriar/xterm.js/blob/3a74930d072fe883c35ded5ee0052470ee44d470/src/browser/Linkifier2.ts#L328 |
The bug here is that _clearCurrentLink was being called only on the line(s) that changed, but _askForLink was then being triggered regardless. This caused more onRenderedViewportChange listeners to be registered and for the thread blocking to get exponentially worse. Fixes xtermjs#4341
VS Code issue: microsoft/vscode#169614
Repros in xterm.js:
The text was updated successfully, but these errors were encountered: