aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/display/content.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-08-29 16:29:13 +0300
committerGitHub <noreply@github.com>2022-08-29 16:29:13 +0300
commit18f9c2793924aec91c80a69ccb45f529adaffae5 (patch)
tree63cda75c8203c39a7437bd1812653f74494f878f /alacritty/src/display/content.rs
parent791f79a02a4bbb509c257af2849e411d32f4c18b (diff)
downloadr-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.rs5
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
}