From f5e66b251fa8ec24989bf25861bcf4e38a561470 Mon Sep 17 00:00:00 2001 From: sf-jin-ku Date: Wed, 3 Jun 2026 09:13:01 -0700 Subject: feat: switch input source during prefix mode (#434) On macOS, opt-in under [experimental], temporarily switch the host input source to the current ASCII-capable layout while prefix mode is active so prefix commands register even when a CJK IME is composing, then restore the previous input source when prefix mode exits or is cancelled. No-op when the current source is already ASCII-capable, on non-macOS platforms, or when any input source call fails. Pane text input is unaffected. Also pin next_resize_poll in next_loop_deadline_includes_selection_autoscroll_deadline so the selection autoscroll deadline stays the earliest; the default resize poll could otherwise beat it and flake the assertion. refs #400 Co-authored-by: Can Celik --- src/app/config_io.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/app/config_io.rs') diff --git a/src/app/config_io.rs b/src/app/config_io.rs index fa2765e9..804a26f6 100644 --- a/src/app/config_io.rs +++ b/src/app/config_io.rs @@ -94,6 +94,19 @@ impl App { } } + pub(super) fn save_switch_ascii_input_source_in_prefix(&mut self, enabled: bool) { + if self.update_config_file("prefix ascii input source", |content| { + crate::config::upsert_section_bool( + content, + "experimental", + "switch_ascii_input_source_in_prefix", + enabled, + ) + }) { + self.apply_config_from_disk(false); + } + } + pub(super) fn save_agent_panel_scope(&mut self, scope: crate::app::state::AgentPanelScope) { let value = match scope { crate::app::state::AgentPanelScope::CurrentWorkspace => { -- cgit v1.2.3