Skip to content

Commit

Permalink
fix IME composition status applying to all panes
Browse files Browse the repository at this point in the history
refs: #2569
  • Loading branch information
wez committed Nov 19, 2022
1 parent 2dd3968 commit 49b9839
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ As features stabilize some brief notes about them will accumulate here.
wezterm gui was already running. Thanks to
[@exactly-one-kas](https://github.com/exactly-one-kas)!
[#2661](https://github.com/wez/wezterm/pull/2661)
* IME composition text and cursor color incorrectly applied to all panes rather
than just the active pane.
[#2569](https://github.com/wez/wezterm/issues/2569)

#### Changed
* Removed Last Resort fallback font
Expand Down
15 changes: 7 additions & 8 deletions wezterm-gui/src/termwindow/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1715,12 +1715,11 @@ impl super::TermWindow {
cursor_border_color: self.cursor_border_color,
cursor_is_default_color: self.cursor_is_default_color,
}),
if let DeadKeyStatus::Composing(composing) =
&self.term_window.dead_key_status
{
Some(composing.to_string())
} else {
None
match (self.pos.is_active, &self.term_window.dead_key_status) {
(true, DeadKeyStatus::Composing(composing)) => {
Some(composing.to_string())
}
_ => None,
},
if self.term_window.config.detect_password_input {
match self.pos.pane.get_metadata() {
Expand Down Expand Up @@ -1790,7 +1789,7 @@ impl super::TermWindow {
let shape_key = LineToEleShapeCacheKey {
shape_hash,
shape_generation: quad_key.shape_generation,
composing: if self.cursor.y == stable_row {
composing: if self.cursor.y == stable_row && self.pos.is_active {
if let DeadKeyStatus::Composing(composing) =
&self.term_window.dead_key_status
{
Expand Down Expand Up @@ -3392,7 +3391,7 @@ impl super::TermWindow {
let dead_key_or_leader =
self.dead_key_status != DeadKeyStatus::None || self.leader_is_active();

if dead_key_or_leader {
if dead_key_or_leader && params.is_active_pane {
let (fg_color, bg_color) =
if self.config.force_reverse_video_cursor && params.cursor_is_default_color {
(params.bg_color, params.fg_color)
Expand Down

0 comments on commit 49b9839

Please sign in to comment.