From 4ae2bc66f2bd213511997addfed8b589fdc97406 Mon Sep 17 00:00:00 2001 From: Anthony Clays Date: Sun, 15 Jul 2018 18:02:44 +0200 Subject: Add support for cursor shape escape sequence --- src/ansi.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/ansi.rs b/src/ansi.rs index e37e25f1..3fbd580d 100644 --- a/src/ansi.rs +++ b/src/ansi.rs @@ -814,6 +814,21 @@ impl<'a, H, W> vte::Perform for Performer<'a, H, W> unhandled(params); } + // Set cursor style + b"50" => { + if params.len() >= 2 && params[1].len() >= 13 && params[1][0..12] == *b"CursorShape=" { + let style = match params[1][12] as char { + '0' => CursorStyle::Block, + '1' => CursorStyle::Beam, + '2' => CursorStyle::Underline, + _ => return unhandled(params), + }; + self.handler.set_cursor_style(Some(style)); + return; + } + unhandled(params); + } + // Set clipboard b"52" => { if params.len() < 3 { -- cgit