Fixed: fully consume unknown CSI sequences containing non-numeric parameter byte #4417
+20
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Standard ECMA-48: Control Functions for Coded Character Sets specifies
the format of CSI commands. Wikipedia has a concise description:
https://en.wikipedia.org/wiki/ANSI_escape_code#Control_Sequence_Introducer_commands
Do this for at least for sequences like "CSI = 5 u" that
contain non-numeric parameter bytes.
This fixes a problem with fish shell 4.0.0 which (for better or worse)
uses that sequence.
This patch introduces a slight inconsistency: for the above example,
"unknownSequence('u')" will be called. The resulting log message may
be confusing, because we do support "CSI u". We should fix this to
log the entire unknown sequence. I can try doing that.
In future we should also fully consume all other unknown CSI commands.
A contrived example would be "CSI ! ! a". If desired, I'm happy to
fix those as well, as I have some context already (but I don't think
that would block this patch).
Closes #4338