Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/src/core/escape/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,13 @@ class EscapeParser {
///
/// https://terminalguide.namepad.de/seq/csi_sm/
void _csiHandleSgr() {
// SGR is `CSI Ps m` and never carries a private prefix. Sequences that share the final byte `m`
// but have a prefix are not SGR — e.g. XTMODKEYS `CSI > Ps ; Ps m` (modifyOtherKeys), which many
// terminals/apps emit. Dispatching on the final byte alone runs those through the SGR handler,
// which then reads their parameters as SGR codes (so `CSI > 4 ; 2 m` turns on underline for every
// subsequent cell). Ignore prefixed sequences here.
if (_csi.prefix != null) return;

final params = _csi.params;

if (params.isEmpty) {
Expand Down