aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/cursor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty/src/cursor.rs')
-rw-r--r--alacritty/src/cursor.rs24
1 files changed, 19 insertions, 5 deletions
diff --git a/alacritty/src/cursor.rs b/alacritty/src/cursor.rs
index e671bf4b..a3e6a2ca 100644
--- a/alacritty/src/cursor.rs
+++ b/alacritty/src/cursor.rs
@@ -18,7 +18,7 @@ use std::cmp;
use alacritty_terminal::ansi::CursorStyle;
-use font::{Metrics, RasterizedGlyph};
+use font::{BitmapBuffer, Metrics, RasterizedGlyph};
/// Width/Height of the cursor relative to the font width
pub const CURSOR_WIDTH_PERCENTAGE: i32 = 15;
@@ -55,7 +55,14 @@ pub fn get_underline_cursor_glyph(width: i32, line_width: i32) -> RasterizedGlyp
let buf = vec![255u8; (width * line_width * 3) as usize];
// Create a custom glyph with the rectangle data attached to it
- RasterizedGlyph { c: ' ', top: line_width, left: 0, height: line_width, width, buf }
+ RasterizedGlyph {
+ c: ' ',
+ top: line_width,
+ left: 0,
+ height: line_width,
+ width,
+ buf: BitmapBuffer::RGB(buf),
+ }
}
// Returns a custom beam cursor character
@@ -64,7 +71,14 @@ pub fn get_beam_cursor_glyph(height: i32, line_width: i32) -> RasterizedGlyph {
let buf = vec![255u8; (line_width * height * 3) as usize];
// Create a custom glyph with the rectangle data attached to it
- RasterizedGlyph { c: ' ', top: height, left: 0, height, width: line_width, buf }
+ RasterizedGlyph {
+ c: ' ',
+ top: height,
+ left: 0,
+ height,
+ width: line_width,
+ buf: BitmapBuffer::RGB(buf),
+ }
}
// Returns a custom box cursor character
@@ -86,7 +100,7 @@ pub fn get_box_cursor_glyph(height: i32, width: i32, line_width: i32) -> Rasteri
}
// Create a custom glyph with the rectangle data attached to it
- RasterizedGlyph { c: ' ', top: height, left: 0, height, width, buf }
+ RasterizedGlyph { c: ' ', top: height, left: 0, height, width, buf: BitmapBuffer::RGB(buf) }
}
// Returns a custom block cursor character
@@ -95,5 +109,5 @@ pub fn get_block_cursor_glyph(height: i32, width: i32) -> RasterizedGlyph {
let buf = vec![255u8; (width * height * 3) as usize];
// Create a custom glyph with the rectangle data attached to it
- RasterizedGlyph { c: ' ', top: height, left: 0, height, width, buf }
+ RasterizedGlyph { c: ' ', top: height, left: 0, height, width, buf: BitmapBuffer::RGB(buf) }
}