Actually disable CSI u in iTerm < 3.5.12

Fixes #11192
This commit is contained in:
Fabian Boehm
2025-02-28 21:15:44 +01:00
parent 1e069b0fff
commit 303af078f3

View File

@@ -487,10 +487,9 @@ pub fn terminal_protocols_enable_ifn() {
|| IN_MIDNIGHT_COMMANDER_PRE_CSI_U.load()
{
"\x1b[?2004h"
} else if IN_ITERM_PRE_CSI_U.load() {
concat!("\x1b[?2004h", "\x1b[>4;1m", "\x1b[>5u", "\x1b=",)
} else if IN_JETBRAINS.load() {
} else if IN_JETBRAINS.load() || IN_ITERM_PRE_CSI_U.load() {
// Jetbrains IDE terminals vomit CSI u
// iTerm fails to option-modify keys
concat!("\x1b[?2004h", "\x1b[>4;1m", "\x1b=",)
} else if IN_KITTY.load() {
// Kitty spams the log for modifyotherkeys
@@ -521,8 +520,8 @@ pub(crate) fn terminal_protocols_disable_ifn() {
}
let sequences = if !feature_test(FeatureFlag::keyboard_protocols) {
"\x1b[?2004l"
} else if IN_ITERM_PRE_CSI_U.load() {
concat!("\x1b[?2004l", "\x1b[>4;0m", "\x1b[<1u", "\x1b>",)
} else if IN_JETBRAINS.load() || IN_ITERM_PRE_CSI_U.load() {
concat!("\x1b[?2004l", "\x1b[>4;0m", "\x1b>",)
} else if IN_JETBRAINS.load() {
concat!("\x1b[?2004l", "\x1b[>4;0m", "\x1b>",)
} else if IN_KITTY.load() {