fix(terminal): handle omitted flags in kitty keyboard protocol push sequence (#4334)
The CSI > u sequence (push) should default omitted flags to 0 per the Kitty keyboard protocol specification. Previously, omitted flags incorrectly defaulted to 1, causing progressive enhancements to be enabled when they should remain disabled. This fix ensures push with no flags (printf "\e[>u") correctly sets flags to 0, matching the protocol specification and making push behavior consistent with the existing CSI = u implementation. Author: Anton Afanasyev <anton@doubleasoftware.com>
This commit is contained in:
parent
671569eb8f
commit
f4e22a2a90
1 changed files with 7 additions and 1 deletions
|
|
@ -3142,8 +3142,14 @@ impl Perform for Grid {
|
||||||
} else if c == 'u' && intermediates == &[b'>'] {
|
} else if c == 'u' && intermediates == &[b'>'] {
|
||||||
// Zellij only supports the first "progressive enhancement" layer of the kitty keyboard
|
// Zellij only supports the first "progressive enhancement" layer of the kitty keyboard
|
||||||
// protocol
|
// protocol
|
||||||
|
// 0 disables, everything else enables.
|
||||||
|
let count = next_param_or(0);
|
||||||
if !self.explicitly_disable_kitty_keyboard_protocol {
|
if !self.explicitly_disable_kitty_keyboard_protocol {
|
||||||
self.supports_kitty_keyboard_protocol = true;
|
if count > 0 {
|
||||||
|
self.supports_kitty_keyboard_protocol = true;
|
||||||
|
} else {
|
||||||
|
self.supports_kitty_keyboard_protocol = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if c == 'u' && intermediates == &[b'<'] {
|
} else if c == 'u' && intermediates == &[b'<'] {
|
||||||
// Zellij only supports the first "progressive enhancement" layer of the kitty keyboard
|
// Zellij only supports the first "progressive enhancement" layer of the kitty keyboard
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue