fix(tui): a bracketed paste that is not the clipboard never attaches its image
The origin check ran only on Otty. An IME commit or a diverged tmux buffer on any other terminal attached whatever image sat on the clipboard.
This commit is contained in:
1 parent
0e063e5b02
commit
041c5ca030
6 files changed
+61
-36
No files matched your search
@@ -189,11 +189,6 @@ impl TerminalName {
|
||||
| Self::Zed
|
||||
)
|
||||
}
|
||||
|
||||
/// Only Otty is known to wrap macOS IME commits in bracketed paste.
|
||||
pub fn delivers_ime_as_bracketed_paste(self) -> bool {
|
||||
matches!(self, Self::Otty)
|
||||
}
|
||||
}
|
||||
|
||||
impl TerminalContext {
|
||||
|
||||
@@ -51,24 +51,6 @@ fn brand_otty_from_term_program() {
|
||||
assert_eq!(detect_terminal_brand_from_env(&env), TerminalName::Otty);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn otty_delivers_ime_as_bracketed_paste_only() {
|
||||
assert!(TerminalName::Otty.delivers_ime_as_bracketed_paste());
|
||||
for brand in [
|
||||
TerminalName::AppleTerminal,
|
||||
TerminalName::Ghostty,
|
||||
TerminalName::Iterm2,
|
||||
TerminalName::Unknown,
|
||||
TerminalName::WezTerm,
|
||||
TerminalName::Kitty,
|
||||
] {
|
||||
assert!(
|
||||
!brand.delivers_ime_as_bracketed_paste(),
|
||||
"{brand:?} must not gate IME bracketed-paste origin"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn otty_is_capability_unclassified_like_unknown() {
|
||||
assert!(TerminalName::Otty.is_capability_unclassified());
|
||||
|
||||
Reference in new issue
Block a user