diff options
Diffstat (limited to 'font/src/darwin/mod.rs')
-rw-r--r-- | font/src/darwin/mod.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs index a6deba3b..56685dd5 100644 --- a/font/src/darwin/mod.rs +++ b/font/src/darwin/mod.rs @@ -470,8 +470,8 @@ impl Font { let width = self.glyph_advance('0') as i32; // Return the new custom glyph return super::get_underline_cursor_glyph(descent, width); - }, - super::BEAM_CURSOR_CHAR => { + } + super::BEAM_CURSOR_CHAR | super::BOX_CURSOR_CHAR => { // Get the top of the bounding box let metrics = self.metrics(); let height = metrics.line_height; @@ -483,9 +483,13 @@ impl Font { // Get the width of the cell let width = self.glyph_advance('0') as i32; // Return the new custom glyph - return super::get_beam_cursor_glyph(ascent as i32, height as i32, width); - }, - _ => (), + if character == super::BEAM_CURSOR_CHAR { + return super::get_beam_cursor_glyph(ascent as i32, height as i32, width); + } else { + return super::get_box_cursor_glyph(ascent as i32, height as i32, width); + } + } + _ => () } let glyph_index = self.glyph_index(character) |