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

warning on unknown CSI for DECRQM #955

Closed
dankamongmen opened this issue Jul 19, 2021 · 3 comments
Closed

warning on unknown CSI for DECRQM #955

dankamongmen opened this issue Jul 19, 2021 · 3 comments
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.

Comments

@dankamongmen
Copy link
Contributor

Describe the bug

Notcurses issues a DECRQM (https://vt100.net/docs/vt510-rm/DECRQM.html) for property 2026 upon startup, checking for Synchronized Mode support. Wezterm prints a diagnostic along the lines of:

2021-07-19T01:09:04.881Z WARN wezterm_term::terminalstate > unknown unspecified CSI: "?$2026p"

The exact query being sent is:

../src/lib/termdesc.c:#define SUMQUERY "\x1b[?2026$p"

Environment (please complete the following information):

  • OS: linux
  • Version: wezterm 20210718-174941-91b3c645

To Reproduce

\x1b[?2026$p

https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/2
https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec

Expected behavior

No reply is required since the feature is not supported. There's no need to print the diagnostic, however.

Additional context

You asked me to file these, so I'm doing so.

With this and #954 knocked out, Notcurses will no longer provoke outbursts from WezTerm on startup.

@dankamongmen dankamongmen added the bug Something isn't working label Jul 19, 2021
@dankamongmen
Copy link
Contributor Author

wez added a commit that referenced this issue Jul 24, 2021
The original design of the vtparse crate was inspired by the vte
crate.  There were some assumptions about the shape of CSI sequences
that were lossy and that is posing a problem when it comes to
implementing DECRQM.

This commit improves the situation by adjusting CsiParam to be capable
of capturing all of the possible parameters as well as intermediates.

This commit isn't done; I just need to push it to transfer it to another
machine.

refs: #882
refs: #955
wez added a commit that referenced this issue Jul 25, 2021
The original design of the vtparse crate was inspired by the vte
crate.  There were some assumptions about the shape of CSI sequences
that were lossy and that is posing a problem when it comes to
implementing DECRQM.

This commit improves the situation by adjusting CsiParam to be capable
of capturing all of the possible parameters as well as intermediates.

This commit isn't done; I just need to push it to transfer it to another
machine.

refs: #882
refs: #955
wez added a commit that referenced this issue Jul 25, 2021
This commit removes the intermediates parameter and collapses it
together with the parameters themselves.

This allows us to model DECSET (eg: `CSI ? 1 l`) correctly.
Previously this would get reported as:

```
  params: [1],
  intermediates: ['?'],
  code: 'l'
```

but since the intermediates are logically things that precede the code,
the canonical interpretation of that would be as if we'd received
`CSI 1 ? l`.

AFAICT, DECSET isn't conforming to ECMA 48 when it comes to this
sequence.

That made things a bit of a headache in the CSI parser, so what we do
now is to treat intermediates as parameters so that it is much simpler
to reason about and match in the CSI parser; we now get:

```
  params: ['?', 1],
  code: 'l',
```

refs: #955
wez added a commit that referenced this issue Jul 25, 2021
This commit hooks up DECRQM so that we can report that we implement
synchronized updates, and then refines the code that manages sending
data to the terminal model; the first cut at synchronized updates
was a bit simplistic, and now we make a point of "flushing" pending
actions when we start a sync point, and again as soon as we release
the sync point.

This smooths out the jaggies around the orca that I mentioned in
dcbbda7

and while testing this, I realized that recent parser changes had
mangled processing bundled dec private mode sequences where multiple
modes were specified in the same overall escape sequence.  I've
added the missing unit test case for this and made that work again.

refs: #955
refs: #882
@wez wez added the fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. label Jul 25, 2021
@wez wez closed this as completed Jul 25, 2021
@dankamongmen
Copy link
Contributor Author

confirmed!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds.
Projects
None yet
Development

No branches or pull requests

2 participants