diff options
author | Dettorer <Dettorer@users.noreply.github.com> | 2020-11-24 00:11:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-23 23:11:03 +0000 |
commit | 2fd2db4afa232ebd15dbfff88160224badeaa669 (patch) | |
tree | ef0cdf3311df017da5fff4d29ce898d690980a3e /alacritty/src/cursor.rs | |
parent | 07cfe8bbba0851ff4989f6aaf082d72130cd0f5b (diff) | |
download | r-alacritty-2fd2db4afa232ebd15dbfff88160224badeaa669.tar.gz r-alacritty-2fd2db4afa232ebd15dbfff88160224badeaa669.tar.bz2 r-alacritty-2fd2db4afa232ebd15dbfff88160224badeaa669.zip |
Add blinking cursor support
This adds support for blinking the terminal cursor. This can be
controlled either using the configuration file, or using escape
sequences.
The supported control sequences for changing the blinking state are
`CSI Ps SP q` and private mode 12.
Diffstat (limited to 'alacritty/src/cursor.rs')
-rw-r--r-- | alacritty/src/cursor.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/alacritty/src/cursor.rs b/alacritty/src/cursor.rs index 8c782185..edf76bf3 100644 --- a/alacritty/src/cursor.rs +++ b/alacritty/src/cursor.rs @@ -2,10 +2,10 @@ use crossfont::{BitmapBuffer, Metrics, RasterizedGlyph}; -use alacritty_terminal::ansi::CursorStyle; +use alacritty_terminal::ansi::CursorShape; pub fn get_cursor_glyph( - cursor: CursorStyle, + cursor: CursorShape, metrics: Metrics, offset_x: i8, offset_y: i8, @@ -26,11 +26,11 @@ pub fn get_cursor_glyph( } match cursor { - CursorStyle::HollowBlock => get_box_cursor_glyph(height, width, line_width), - CursorStyle::Underline => get_underline_cursor_glyph(width, line_width), - CursorStyle::Beam => get_beam_cursor_glyph(height, line_width), - CursorStyle::Block => get_block_cursor_glyph(height, width), - CursorStyle::Hidden => RasterizedGlyph::default(), + CursorShape::HollowBlock => get_box_cursor_glyph(height, width, line_width), + CursorShape::Underline => get_underline_cursor_glyph(width, line_width), + CursorShape::Beam => get_beam_cursor_glyph(height, line_width), + CursorShape::Block => get_block_cursor_glyph(height, width), + CursorShape::Hidden => RasterizedGlyph::default(), } } |