diff options
author | Anthony Clays <anthony@clays.me> | 2018-07-15 18:02:44 +0200 |
---|---|---|
committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-07-15 16:02:44 +0000 |
commit | 4ae2bc66f2bd213511997addfed8b589fdc97406 (patch) | |
tree | f96bd20754498dc8f5592505d30e951099ede72f | |
parent | 18f6a7814a7aff8fb06d6b9a795e0f8144954d1f (diff) | |
download | alacritty-4ae2bc66f2bd213511997addfed8b589fdc97406.tar.gz alacritty-4ae2bc66f2bd213511997addfed8b589fdc97406.zip |
Add support for cursor shape escape sequence
-rw-r--r-- | src/ansi.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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 { |