aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-server/src/unit
diff options
context:
space:
mode:
authorSatoru Higa <satoruhiga@gmail.com>2026-04-03 17:21:34 +0900
committerGitHub <noreply@github.com>2026-04-03 10:21:34 +0200
commit27a825ebdcae75d00a90396acf861fe1c90a2a6d (patch)
tree107a4a6a9f4dbc323eecfbaadbcb0425daa148a5 /zellij-server/src/unit
parentfix(windows): encode modifiers in raw bytes for non-Char keys (#4967) (diff)
downloadsl0ppij-27a825ebdcae75d00a90396acf861fe1c90a2a6d.tar.gz
sl0ppij-27a825ebdcae75d00a90396acf861fe1c90a2a6d.tar.xz
sl0ppij-27a825ebdcae75d00a90396acf861fe1c90a2a6d.zip
fix: position host cursor for CJK IME even when app hides cursor (#4951)
* fix: position host cursor for CJK IME even when app hides cursor When apps like Claude Code (ink/React library) hide the cursor during rendering, Zellij's render_cursor() was not sending a CUP sequence to the host terminal. This caused IME composition candidates to appear at the wrong position, breaking CJK input in these apps. Change cursor_coordinates() to return the cursor position unconditionally (as long as it is within bounds) along with a bool indicating visibility. render_cursor() now positions the host cursor even when the app has hidden it, so the IME subsystem can read the correct cursor position. * add test * rustfmt --------- Co-authored-by: Aram Drevekenin <aram@poor.dev>
Diffstat (limited to 'zellij-server/src/unit')
-rw-r--r--zellij-server/src/unit/screen_tests.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/zellij-server/src/unit/screen_tests.rs b/zellij-server/src/unit/screen_tests.rs
index 0897ec49..07ec8623 100644
--- a/zellij-server/src/unit/screen_tests.rs
+++ b/zellij-server/src/unit/screen_tests.rs
@@ -63,7 +63,10 @@ fn take_snapshot_and_cursor_coordinates(
for &byte in ansi_instructions.as_bytes() {
vte_parser.advance(grid, byte);
}
- (grid.cursor_coordinates(), format!("{:?}", grid))
+ let coords = grid
+ .cursor_coordinates()
+ .and_then(|(x, y, visible)| if visible { Some((x, y)) } else { None });
+ (coords, format!("{:?}", grid))
}
fn take_snapshots_and_cursor_coordinates_from_render_events<'a>(