aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-client/src/lib.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-06-16 15:44:22 +0200
committerGitHub <noreply@github.com>2026-06-16 15:44:22 +0200
commit8c7e41c9aaafc44520380a2c86db517fde54ad31 (patch)
treed54bb40aef913c07f2142bd835dfa47d09fae5af /zellij-client/src/lib.rs
parentMobile layout (#5241) (diff)
downloadsl0ppij-8c7e41c9aaafc44520380a2c86db517fde54ad31.tar.gz
sl0ppij-8c7e41c9aaafc44520380a2c86db517fde54ad31.tar.xz
sl0ppij-8c7e41c9aaafc44520380a2c86db517fde54ad31.zip
chore: new test infra (#5269)
* initial implementation * refactoring and cleanups * port basic e2e tests * fix tab rotation * migrate client and mouse tests * migrate the rest of the tests * remove old e2e tests * rustfmt * add e2e note * fix stale test * fix: cross platform locking/cleanup * fix: change mode race discovered by tests * rustfmt * fix: attach/detach race in tests * fix plugin test assertion * add pr
Diffstat (limited to 'zellij-client/src/lib.rs')
-rw-r--r--zellij-client/src/lib.rs34
1 files changed, 18 insertions, 16 deletions
diff --git a/zellij-client/src/lib.rs b/zellij-client/src/lib.rs
index d674e022..2c8cc950 100644
--- a/zellij-client/src/lib.rs
+++ b/zellij-client/src/lib.rs
@@ -879,7 +879,7 @@ pub fn start_client(
os_input.update_session_name(name);
let ipc_pipe = create_ipc_pipe();
- spawn_server(&*ipc_pipe, cli_args.debug).unwrap();
+ os_input.spawn_server(&*ipc_pipe, cli_args.debug).unwrap();
if should_start_web_server {
if let Err(e) = spawn_web_server(&cli_args) {
log::error!("Failed to start web server: {}", e);
@@ -933,7 +933,7 @@ pub fn start_client(
os_input.update_session_name(name);
let ipc_pipe = create_ipc_pipe();
- spawn_server(&*ipc_pipe, cli_args.debug).unwrap();
+ os_input.spawn_server(&*ipc_pipe, cli_args.debug).unwrap();
if should_start_web_server {
if let Err(e) = spawn_web_server(&cli_args) {
log::error!("Failed to start web server: {}", e);
@@ -971,18 +971,20 @@ pub fn start_client(
> = channels::bounded(50);
let send_input_instructions = SenderWithContext::new(send_input_instructions);
- std::panic::set_hook({
- use zellij_utils::errors::handle_panic;
- let send_client_instructions = send_client_instructions.clone();
- let os_input = os_input.clone();
- Box::new(move |info| {
- os_input.disable_mouse().non_fatal();
- os_input.restore_console_mode();
- if let Ok(()) = os_input.unset_raw_mode() {
- handle_panic(info, Some(&send_client_instructions));
- }
- })
- });
+ if os_input.should_install_panic_hook() {
+ std::panic::set_hook({
+ use zellij_utils::errors::handle_panic;
+ let send_client_instructions = send_client_instructions.clone();
+ let os_input = os_input.clone();
+ Box::new(move |info| {
+ os_input.disable_mouse().non_fatal();
+ os_input.restore_console_mode();
+ if let Ok(()) = os_input.unset_raw_mode() {
+ handle_panic(info, Some(&send_client_instructions));
+ }
+ })
+ });
+ }
let on_force_close = config_options.on_force_close.unwrap_or_default();
let stdin_ansi_parser = Arc::new(Mutex::new(StdinAnsiParser::new()));
@@ -1333,7 +1335,7 @@ pub fn start_server_detached(
os_input.update_session_name(name);
let ipc_pipe = create_ipc_pipe();
- spawn_server(&*ipc_pipe, cli_args.debug).unwrap();
+ os_input.spawn_server(&*ipc_pipe, cli_args.debug).unwrap();
if should_start_web_server {
if let Err(e) = spawn_web_server(&cli_args) {
log::error!("Failed to start web server: {}", e);
@@ -1388,7 +1390,7 @@ pub fn start_server_detached(
os_input.update_session_name(name);
let ipc_pipe = create_ipc_pipe();
- spawn_server(&*ipc_pipe, cli_args.debug).unwrap();
+ os_input.spawn_server(&*ipc_pipe, cli_args.debug).unwrap();
if should_start_web_server {
if let Err(e) = spawn_web_server(&cli_args) {
log::error!("Failed to start web server: {}", e);