Skip to content

Fix ^C not working to end for newer fish + kitty keyboard protocol#5737

Merged
anthonykim1 merged 1 commit intomasterfrom
anthonykim1/fixKittyKeyboardFish
Mar 6, 2026
Merged

Fix ^C not working to end for newer fish + kitty keyboard protocol#5737
anthonykim1 merged 1 commit intomasterfrom
anthonykim1/fixKittyKeyboardFish

Conversation

@anthonykim1
Copy link
Member

Should resolve: microsoft/vscode#295372
We shouldn't read beyond params.length - 1:

* - never read beyond `params.length - 1` (likely to contain arbitrary data)

Reset only sets this.length = 0, it does not zero out underlying array.

So when fish sends CSI = 0 u (one param), params.length is 1, but params.params[1] reads whatever int was left in slot 1 from previous CSI sequence.
SO if that leftover vlaue happens to be 2 or 3, mode becomes 2,3 instead of spec-mandated default 1:

If the modifier field is not present in the escape code, its default value is 1 which means no modifiers. in https://sw.kovidgoyal.net/kitty/keyboard-protocol/#modifiers

@anthonykim1 anthonykim1 requested review from Tyriar and meganrogge March 6, 2026 17:00
@anthonykim1 anthonykim1 self-assigned this Mar 6, 2026
@anthonykim1 anthonykim1 added this to the 7.0.0 milestone Mar 6, 2026
Copy link
Member

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@anthonykim1 anthonykim1 marked this pull request as ready for review March 6, 2026 17:09
@anthonykim1 anthonykim1 merged commit f4166a8 into master Mar 6, 2026
12 checks passed
@anthonykim1 anthonykim1 deleted the anthonykim1/fixKittyKeyboardFish branch March 6, 2026 17:47
Br1an67 pushed a commit to Br1an67/xterm.js that referenced this pull request Mar 7, 2026
…oardFish

Fix ^C not working to end for newer fish + kitty keyboard protocol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrated terminal: Ctrl+C no longer interrupts running processes (regression in Insiders)

2 participants