From 1d5df1868cd5942aa090cd7fc29d304c6863fab4 Mon Sep 17 00:00:00 2001 From: hasezoey Date: Sun, 22 Jun 2025 19:11:36 +0200 Subject: [PATCH] fix(sixel): exit on "Unknown" keys This fixes running tests with feature "sixel" enable on Konsole --- src/printer/sixel.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/printer/sixel.rs b/src/printer/sixel.rs index e5a4667..db45b81 100644 --- a/src/printer/sixel.rs +++ b/src/printer/sixel.rs @@ -65,6 +65,11 @@ fn check_device_attrs() -> ViuResult { let mut response = String::new(); while let Ok(key) = term.read_key() { + // exit on first "Unknown" key as we know that this is not a proper response anymore + if key == Key::Unknown { + break; + } + if let Key::Char(c) = key { response.push(c); if c == 'c' {