-
Notifications
You must be signed in to change notification settings - Fork 8.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
Unsupported CSI, OSC or DEC private mode parsing is interrupted on a delay #3081
Comments
Oh, this is interesting. We only flush the unknown/unparseable string that completed the sequence! That'll be the root cause for the sibling bug as well. Thanks! |
(We successfully identify that we're dealing with |
Explicit hyperlinks (not yet supported: #204) are also affected in the same way (tested in 0.8.10091.0). Test with: The longer the target URL, the more likely the corruption occurs, but it is easily reproducible with short URLs too by injecting a delay. This is likely to cause actual problems, since there's no way to detect (or advertise) hyperlink support, most of the apps just assume that the terminal at least silently ignores the sequence. See e.g. the recent discussion under the hyperlink spec. |
When we had to flush unknown sequences to the terminal, we were only taking the _most recent run_ with us; therefore, if we received `\e[?12` and `34h` in separate packets we would _only_ send out `34h`. This change fixes that issue by ensuring that we cache partial bits of sequences we haven't yet completed, just in case we need to flush them. Fixes #3080. Fixes #3081.
When we had to flush unknown sequences to the terminal, we were only taking the _most recent run_ with us; therefore, if we received `\e[?12` and `34h` in separate packets we would _only_ send out `34h`. This change fixes that issue by ensuring that we cache partial bits of sequences we haven't yet completed, just in case we need to flush them. Fixes #3080. Fixes #3081.
When we had to flush unknown sequences to the terminal, we were only taking the _most recent run_ with us; therefore, if we received `\e[?12` and `34h` in separate packets we would _only_ send out `34h`. This change fixes that issue by ensuring that we cache partial bits of sequences we haven't yet completed, just in case we need to flush them. Fixes microsoft#3080. Fixes microsoft#3081.
Environment
Steps to reproduce
Sibling issue of #3080. Execute this:
Expected behavior
As if the delay wasn't there, this should attempt to enable DEC private mode 1234, which is unsupported by WT (actually undefined), so no action should be taken.
Actual behavior
34h
is printed, suggesting that parsing the sequence got interrupted.Note that if the given number is supported (e.g. 1049 to switch to the alternate screen) then the sequence is parsed and executed correctly even when a delay is injected.
Update:
The same goes for unsupported CSI modes too, e.g.
\e[22;0;0t
(save title on stack) or\e[4l
(replace mode).The text was updated successfully, but these errors were encountered: