diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-08-29 16:29:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 16:29:13 +0300 |
commit | 18f9c2793924aec91c80a69ccb45f529adaffae5 (patch) | |
tree | 63cda75c8203c39a7437bd1812653f74494f878f /alacritty/src/display/content.rs | |
parent | 791f79a02a4bbb509c257af2849e411d32f4c18b (diff) | |
download | r-alacritty-18f9c2793924aec91c80a69ccb45f529adaffae5.tar.gz r-alacritty-18f9c2793924aec91c80a69ccb45f529adaffae5.tar.bz2 r-alacritty-18f9c2793924aec91c80a69ccb45f529adaffae5.zip |
Add inline input method support
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.
Fixes #1613.
Diffstat (limited to 'alacritty/src/display/content.rs')
-rw-r--r-- | alacritty/src/display/content.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/alacritty/src/display/content.rs b/alacritty/src/display/content.rs index 478982bb..c062ba9b 100644 --- a/alacritty/src/display/content.rs +++ b/alacritty/src/display/content.rs @@ -51,6 +51,7 @@ impl<'a> RenderableContent<'a> { let cursor_shape = if terminal_content.cursor.shape == CursorShape::Hidden || display.cursor_hidden || search_state.regex().is_some() + || display.ime.preedit().is_some() { CursorShape::Hidden } else if !term.is_focused && config.terminal_config.cursor.unfocused_hollow { @@ -394,6 +395,10 @@ impl RenderableCursor { } impl RenderableCursor { + pub fn new(point: Point<usize>, shape: CursorShape, cursor_color: Rgb, is_wide: bool) -> Self { + Self { shape, cursor_color, text_color: cursor_color, is_wide, point } + } + pub fn color(&self) -> Rgb { self.cursor_color } |