fix(input): handle DA1 responses with extended attributes from modern terminals#2908
Open
kofany wants to merge 2 commits intodankamongmen:masterfrom
Open
fix(input): handle DA1 responses with extended attributes from modern terminals#2908kofany wants to merge 2 commits intodankamongmen:masterfrom
kofany wants to merge 2 commits intodankamongmen:masterfrom
Conversation
tmux 3.4+ with sixel support responds to DA1 query with CSI ? 1 ; 2 ; 4 c where the '4' indicates sixel capability. The existing parser only handled responses with up to 2 parameters, causing a hang when encountering 3+. Added two patterns to handle this: - Explicit pattern for tmux's specific response: [?1;2;4c - General pattern for DA1 with 3+ params: [?\N;\N;\Dc
… terminals Fixes dankamongmen#2736 Problem: tmux 3.4+ with sixel support sends DA1 response CSI ? 1 ; 2 ; 4 c which notcurses couldn't parse, causing applications to hang during init. Solution: Add specific patterns for DA1 responses with extended attributes. Generic patterns like [?\N;\N;\Dc conflicted with XTSMGRAPHICS patterns in the automaton, so specific patterns are used instead. Added patterns: - [?1;2;\Dc - VT100 with extended attrs (tmux 3.4+ with sixel) - [?62;\Dc - VT220 (Ghostty, Kitty) - [?63;\Dc - VT320 - [?64;\Dc - VT420 (iTerm2) - [?65;\Dc - VT520 (WezTerm) Tested on: Ghostty, iTerm2, Kitty, Alacritty, Terminal.app, tmux, screen
|
By dropping the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #2736
tmux 3.4+ with sixel support sends DA1 response
CSI ? 1 ; 2 ; 4 cwhich notcurses couldn't parse, causing applications to hang during initialization.Solution
Add specific patterns for DA1 responses with extended attributes:
[?1;2;\Dc- VT100 with extended attrs (tmux 3.4+ with sixel)[?62;\Dc- VT220 (Ghostty, Kitty)[?63;\Dc- VT320[?64;\Dc- VT420 (iTerm2)[?65;\Dc- VT520 (WezTerm)Generic patterns like
[?\N;\N;\Dcconflicted with XTSMGRAPHICS patterns ([?1;0;\NS) in the automaton FSM, causing build failures. Specific patterns avoid these conflicts while covering all major terminals.Testing
Tested successfully on:
All terminals now initialize correctly without hanging.