Skip to content

Commit

Permalink
Add inline input method support
Browse files Browse the repository at this point in the history
This commit adds support for inline IME handling. It also makes search
bar draw proper Underline cursor instead of using '_' character.

Fixes #1613.
  • Loading branch information
kchibisov committed Mar 3, 2022
1 parent d8113dc commit bce9442
Show file tree
Hide file tree
Showing 8 changed files with 287 additions and 48 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Escape sequence for undercurl, dotted and dashed underlines (`CSI 4 : [3-5] m`)
- `ToggleMaximized` key binding action to (un-)maximize the active window, not bound by default
- Support for OpenGL ES 2.0
- Support for inline input method

### Changed

- The `--help` output was reworked with a new colorful syntax
- Search bar is now respecting cursor thickness

### Fixed

Expand Down
25 changes: 17 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ members = [
lto = true
debug = 1
incremental = false

[patch.crates-io]
winit = { git = "https://github.com/rust-windowing/winit", branch = "composition-event" }
5 changes: 5 additions & 0 deletions alacritty/src/display/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ impl<'a> RenderableContent<'a> {
// Find terminal cursor shape.
let cursor_shape = if terminal_content.cursor.shape == CursorShape::Hidden
|| display.cursor_hidden
|| display.handling_ime()
|| search_state.regex().is_some()
{
CursorShape::Hidden
Expand Down Expand Up @@ -379,6 +380,10 @@ impl RenderableCursor {
}

impl RenderableCursor {
pub fn new(point: Point<usize>, shape: CursorShape, cursor_color: Rgb, is_wide: bool) -> Self {
Self { point, shape, cursor_color, text_color: cursor_color, is_wide }
}

pub fn color(&self) -> Rgb {
self.cursor_color
}
Expand Down

0 comments on commit bce9442

Please sign in to comment.