From c688adc7b514de92afdb9c3c27faeda95f8fa475 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 22 Apr 2021 20:08:58 +0000 Subject: Fix cursor expansion across wide chars This fixes a regression introduced in 0.7.0 where the block cursor would not expand across both cells anymore when on top of a wide char spacer cell. The logic to always move the cursor on the wide char instead of the spacer has been moved to the alacritty_terminal crate, making sure it is always performed before any processing in the UI. --- alacritty/src/display/content.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'alacritty') diff --git a/alacritty/src/display/content.rs b/alacritty/src/display/content.rs index 1d06c349..8f1a74d6 100644 --- a/alacritty/src/display/content.rs +++ b/alacritty/src/display/content.rs @@ -102,14 +102,6 @@ impl<'a> RenderableContent<'a> { return None; } - // Expand across wide cell when inside wide char or spacer. - let is_wide = if cell.flags.contains(Flags::WIDE_CHAR_SPACER) { - self.terminal_cursor.point.column -= 1; - true - } else { - cell.flags.contains(Flags::WIDE_CHAR) - }; - // Cursor colors. let color = if self.terminal_content.mode.contains(TermMode::VI) { self.config.ui_config.colors.vi_mode_cursor @@ -139,10 +131,10 @@ impl<'a> RenderableContent<'a> { let point = display::point_to_viewport(display_offset, cursor_point).unwrap(); Some(RenderableCursor { + is_wide: cell.flags.contains(Flags::WIDE_CHAR), shape: self.terminal_cursor.shape, cursor_color, text_color, - is_wide, point, }) } -- cgit