diff options
Diffstat (limited to 'src/app/mod.rs')
| -rw-r--r-- | src/app/mod.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/app/mod.rs b/src/app/mod.rs index 661926ee..0dcd0372 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -490,6 +490,8 @@ impl App { sidebar_section_split, agent_panel_scope, mouse_capture: config.ui.mouse_capture, + right_click_passthrough_modifiers: config.ui.right_click_passthrough_modifiers(), + right_click_passthrough: None, redraw_on_focus_gained: config.ui.redraw_on_focus_gained, mouse_scroll_lines: config.ui.mouse_scroll_lines(), confirm_close: config.ui.confirm_close, @@ -1107,6 +1109,8 @@ impl App { } self.state.redraw_on_focus_gained = config.ui.redraw_on_focus_gained; self.state.mouse_scroll_lines = config.ui.mouse_scroll_lines(); + self.state.right_click_passthrough_modifiers = + config.ui.right_click_passthrough_modifiers(); self.state.confirm_close = config.ui.confirm_close; self.state.prompt_new_tab_name = config.ui.prompt_new_tab_name; self.state.show_agent_labels_on_pane_borders = @@ -1717,7 +1721,7 @@ mod tests { std::fs::create_dir_all(path.parent().unwrap()).unwrap(); std::fs::write( &path, - "[terminal]\ndefault_shell = \"nu\"\nshell_mode = \"non_login\"\nnew_cwd = \"home\"\n[keys]\nnew_workspace = \"prefix+m\"\nprefix = \"ctrl+a\"\n[ui]\nagent_panel_scope = \"current\"\nredraw_on_focus_gained = false\n[ui.toast]\ndelivery = \"herdr\"\n", + "[terminal]\ndefault_shell = \"nu\"\nshell_mode = \"non_login\"\nnew_cwd = \"home\"\n[keys]\nnew_workspace = \"prefix+m\"\nprefix = \"ctrl+a\"\n[ui]\nagent_panel_scope = \"current\"\nredraw_on_focus_gained = false\nright_click_passthrough_modifier = \"ctrl\"\n[ui.toast]\ndelivery = \"herdr\"\n", ) .unwrap(); std::env::set_var(crate::config::CONFIG_PATH_ENV_VAR, &path); @@ -1742,6 +1746,10 @@ mod tests { state::AgentPanelScope::CurrentWorkspace ); assert!(!app.state.redraw_on_focus_gained); + assert_eq!( + app.state.right_click_passthrough_modifiers, + Some(KeyModifiers::CONTROL) + ); assert!(app.state.request_client_config_reload); assert_eq!(app.state.default_shell, "nu"); assert_eq!( |
