diff options
Diffstat (limited to 'src/pane/osc.rs')
| -rw-r--r-- | src/pane/osc.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pane/osc.rs b/src/pane/osc.rs index 83cb47ae..2fef72a2 100644 --- a/src/pane/osc.rs +++ b/src/pane/osc.rs @@ -11,6 +11,7 @@ use super::terminal::GhosttyPaneCore; pub(super) enum DefaultColorQuery { Foreground, Background, + Cursor, } impl DefaultColorQuery { @@ -18,6 +19,7 @@ impl DefaultColorQuery { match self { Self::Foreground => 10, Self::Background => 11, + Self::Cursor => 12, } } } @@ -247,6 +249,7 @@ fn parse_default_color_event(body: &[u8]) -> Option<DefaultColorEvent> { match body { b"10;?" => Some(DefaultColorEvent::Query(DefaultColorQuery::Foreground)), b"11;?" => Some(DefaultColorEvent::Query(DefaultColorQuery::Background)), + b"12;?" => Some(DefaultColorEvent::Query(DefaultColorQuery::Cursor)), b"110" | b"110;" => Some(DefaultColorEvent::Reset(DefaultColorQuery::Foreground)), b"111" | b"111;" => Some(DefaultColorEvent::Reset(DefaultColorQuery::Background)), _ => parse_palette_color_query(body).or_else(|| parse_default_color_set_event(body)), @@ -1288,7 +1291,7 @@ mod tests { let mut tracker = DefaultColorEventTracker::default(); tracker.observe( - b"\x1b]10;?\x07\x1b]11;?\x1b\\\x1b]4;0;?\x07\x1b]10;rgb:11/22/33\x07\x1b]111\x07", + b"\x1b]10;?\x07\x1b]11;?\x1b\\\x1b]12;?\x07\x1b]4;0;?\x07\x1b]10;rgb:11/22/33\x07\x1b]111\x07", ); assert_eq!( @@ -1296,6 +1299,7 @@ mod tests { vec