From a4d5b0238d18fb1bd8f0a05995b1e81b5252849e Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Thu, 26 Jun 2025 12:57:05 +0200 Subject: [PATCH] performance(terminal): consolidate renders (#4245) * work * fix tests for async rendering * remove comment * some cleanups * style(fmt): rustfmt * fix e2e tests * fix more e2e tests * style(fmt): rustfmt * fix one more test * style(fmt): rustfmt --- src/tests/e2e/cases.rs | 20 ++++--- src/tests/e2e/remote_runner.rs | 4 ++ ...e2e__cases__detach_and_attach_session.snap | 3 +- zellij-server/src/background_jobs.rs | 2 +- zellij-server/src/screen.rs | 37 ++++++++++--- zellij-server/src/unit/screen_tests.rs | 55 ++++++++++++++++++- ...een_can_move_pane_to_a_new_tab_left-3.snap | 42 +++++++------- ...een_can_move_pane_to_a_new_tab_left-4.snap | 25 +-------- ...en_can_move_pane_to_a_new_tab_right-3.snap | 42 +++++++------- ...en_can_move_pane_to_a_new_tab_right-4.snap | 25 +-------- ...i_edit_action_with_default_parameters.snap | 5 +- ...send_cli_edit_action_with_line_number.snap | 5 +- ..._cli_edit_action_with_split_direction.snap | 5 +- ...nd_cli_half_page_scroll_down_action-2.snap | 20 +++---- ...nd_cli_half_page_scroll_down_action-3.snap | 20 +++---- ...nd_cli_half_page_scroll_down_action-4.snap | 20 +++---- ...nd_cli_half_page_scroll_down_action-5.snap | 14 ++++- ...send_cli_half_page_scroll_up_action-2.snap | 20 +++---- ...send_cli_half_page_scroll_up_action-3.snap | 14 ++++- ...w_pane_action_with_default_parameters.snap | 5 +- ...on_with_floating_pane_and_coordinates.snap | 5 +- ..._new_pane_action_with_split_direction.snap | 5 +- ...s__send_cli_page_scroll_down_action-2.snap | 20 +++---- ...s__send_cli_page_scroll_down_action-3.snap | 20 +++---- ...s__send_cli_page_scroll_down_action-4.snap | 20 +++---- ...s__send_cli_page_scroll_down_action-5.snap | 14 ++++- ...sts__send_cli_page_scroll_up_action-2.snap | 20 +++---- ...sts__send_cli_page_scroll_up_action-3.snap | 14 ++++- ...s__send_cli_resize_action_to_screen-2.snap | 42 +++++++------- ...s__send_cli_resize_action_to_screen-3.snap | 25 +-------- ...sts__send_cli_resize_action_to_screen.snap | 24 +++++++- ..._tests__send_cli_scroll_down_action-2.snap | 20 +++---- ..._tests__send_cli_scroll_down_action-4.snap | 15 +---- ...s__send_cli_scroll_to_bottom_action-2.snap | 20 +++---- ...s__send_cli_scroll_to_bottom_action-3.snap | 20 +++---- ...s__send_cli_scroll_to_bottom_action-4.snap | 15 +---- ...ests__send_cli_scroll_to_top_action-2.snap | 20 +++---- ...ests__send_cli_scroll_to_top_action-3.snap | 14 ++++- ...ests__send_cli_scroll_to_top_action-4.snap | 5 ++ ...en_tests__send_cli_scroll_up_action-2.snap | 20 +++---- ...end_cli_toggle_active_tab_sync_action.snap | 2 +- ...ests__send_cli_write_action_to_screen.snap | 2 +- ...send_cli_write_chars_action_to_screen.snap | 2 +- zellij-utils/src/errors.rs | 1 + 44 files changed, 383 insertions(+), 365 deletions(-) create mode 100644 zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-4.snap diff --git a/src/tests/e2e/cases.rs b/src/tests/e2e/cases.rs index 42df89a7..50373428 100644 --- a/src/tests/e2e/cases.rs +++ b/src/tests/e2e/cases.rs @@ -916,7 +916,9 @@ pub fn resize_pane() { name: "Wait for pane to be resized", instruction: |remote_terminal: RemoteTerminal| -> bool { let mut step_is_complete = false; - if remote_terminal.cursor_position_is(57, 2) && remote_terminal.status_bar_appears() + if remote_terminal.cursor_position_is(57, 2) + && remote_terminal.status_bar_appears() + && remote_terminal.snapshot_contains("LOCK") { // pane has been resized step_is_complete = true; @@ -1043,9 +1045,8 @@ pub fn resize_terminal_window() { name: "wait for terminal to be resized and app to be re-rendered", instruction: |remote_terminal: RemoteTerminal| -> bool { let mut step_is_complete = false; - if remote_terminal.cursor_position_is(53, 2) - && remote_terminal.status_bar_appears() - && remote_terminal.snapshot_contains("Ctrl +") + eprintln!("current_snapshot: {}", remote_terminal.current_snapshot()); + if remote_terminal.cursor_position_is(53, 2) && remote_terminal.ctrl_plus_appears() { // size has been changed step_is_complete = true; @@ -1135,7 +1136,7 @@ pub fn detach_and_attach_session() { name: "Wait for session to be attached", instruction: |remote_terminal: RemoteTerminal| -> bool { let mut step_is_complete = false; - if remote_terminal.status_bar_appears() && remote_terminal.cursor_position_is(77, 2) + if remote_terminal.ctrl_plus_appears() && remote_terminal.cursor_position_is(77, 2) { // we're back inside the session step_is_complete = true; @@ -1354,7 +1355,9 @@ fn focus_pane_with_mouse() { name: "Wait for left pane to be focused", instruction: |remote_terminal: RemoteTerminal| -> bool { let mut step_is_complete = false; - if remote_terminal.cursor_position_is(3, 2) && remote_terminal.status_bar_appears() + if remote_terminal.cursor_position_is(3, 2) + && remote_terminal.status_bar_appears() + && remote_terminal.snapshot_contains("LOCK") { // cursor is in the newly opened second pane step_is_complete = true; @@ -1405,6 +1408,7 @@ pub fn scrolling_inside_a_pane_with_mouse() { let mut step_is_complete = false; if remote_terminal.cursor_position_is(63, 2) && remote_terminal.status_bar_appears() + && remote_terminal.snapshot_contains("LOCK") { remote_terminal.load_fixture("e2e/scrolling_inside_a_pane"); step_is_complete = true; @@ -2033,7 +2037,9 @@ pub fn toggle_floating_panes() { name: "Wait for new pane to appear", instruction: |remote_terminal: RemoteTerminal| -> bool { let mut step_is_complete = false; - if remote_terminal.cursor_position_is(33, 8) { + if remote_terminal.cursor_position_is(33, 8) + && remote_terminal.snapshot_contains("STAGGERED") + { // cursor is in the newly opened second pane step_is_complete = true; } diff --git a/src/tests/e2e/remote_runner.rs b/src/tests/e2e/remote_runner.rs index 626007c4..b9035002 100644 --- a/src/tests/e2e/remote_runner.rs +++ b/src/tests/e2e/remote_runner.rs @@ -356,6 +356,10 @@ impl RemoteTerminal { x == self.cursor_x && y == self.cursor_y } pub fn status_bar_appears(&self) -> bool { + self.last_snapshot.lock().unwrap().contains("Ctrl +") + && self.last_snapshot.lock().unwrap().contains("LOCK") + } + pub fn ctrl_plus_appears(&self) -> bool { self.last_snapshot.lock().unwrap().contains("Ctrl +") } pub fn tab_bar_appears(&self) -> bool { diff --git a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__detach_and_attach_session.snap b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__detach_and_attach_session.snap index d1108acc..a979e956 100644 --- a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__detach_and_attach_session.snap +++ b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__detach_and_attach_session.snap @@ -1,6 +1,5 @@ --- source: src/tests/e2e/cases.rs -assertion_line: 1154 expression: last_snapshot --- Zellij (e2e-test)  Tab #1  @@ -26,4 +25,4 @@ expression: last_snapshot │ ││ │ │ ││ │ └──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘ - Ctrl + LOCK 

PANE  TAB  RESIZE  MOVE  SEARCH  SESSION  QUIT  ... + Ctrl + SESSION   d  Detach  w  Manager  s  Share  c  Config  p  Plugins  a  About  ... diff --git a/zellij-server/src/background_jobs.rs b/zellij-server/src/background_jobs.rs index ce602609..cbeacb5e 100644 --- a/zellij-server/src/background_jobs.rs +++ b/zellij-server/src/background_jobs.rs @@ -483,7 +483,7 @@ pub(crate) fn background_jobs_main( let task_start_time = current_time; async move { task::sleep(std::time::Duration::from_millis(REPAINT_DELAY_MS)).await; - let _ = senders.send_to_screen(ScreenInstruction::Render); + let _ = senders.send_to_screen(ScreenInstruction::RenderToClients); { let mut last_render_request = last_render_request.lock().unwrap(); if let Some(last_render_request) = *last_render_request { diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs index 127a44b8..d1b2139c 100644 --- a/zellij-server/src/screen.rs +++ b/zellij-server/src/screen.rs @@ -147,6 +147,7 @@ pub enum ScreenInstruction { PtyBytes(u32, VteBytes), PluginBytes(Vec), Render, + RenderToClients, NewPane( PaneId, Option, @@ -429,6 +430,7 @@ impl From<&ScreenInstruction> for ScreenContext { ScreenInstruction::PtyBytes(..) => ScreenContext::HandlePtyBytes, ScreenInstruction::PluginBytes(..) => ScreenContext::PluginBytes, ScreenInstruction::Render => ScreenContext::Render, + ScreenInstruction::RenderToClients => ScreenContext::RenderToClients, ScreenInstruction::NewPane(..) => ScreenContext::NewPane, ScreenInstruction::OpenInPlaceEditor(..) => ScreenContext::OpenInPlaceEditor, ScreenInstruction::TogglePaneEmbedOrFloating(..) => { @@ -1273,8 +1275,30 @@ impl Screen { } } - /// Renders this [`Screen`], which amounts to rendering its active [`Tab`]. pub fn render(&mut self, plugin_render_assets: Option>) -> Result<()> { + // here we schedule the RenderToClients background job which debounces renders every 10ms + // rather than actually rendering + // + // when this job decides to render, it sends back the ScreenInstruction::RenderToClients + // message, triggering our render_to_clients method which does the actual rendering + + let _ = self + .bus + .senders + .send_to_background_jobs(BackgroundJob::RenderToClients); + if let Some(plugin_render_assets) = plugin_render_assets { + let _ = self + .bus + .senders + .send_to_plugin(PluginInstruction::UnblockCliPipes(plugin_render_assets)) + .context("failed to unblock input pipe"); + } + Ok(()) + } + + pub fn render_to_clients(&mut self) -> Result<()> { + // this method does the actual rendering and is triggered by a debounced BackgroundJob (see + // the render method for more details) let err_context = "failed to render screen"; let mut output = Output::new( @@ -1304,13 +1328,6 @@ impl Screen { .send_to_server(ServerInstruction::Render(Some(serialized_output))) .context(err_context); } - if let Some(plugin_render_assets) = plugin_render_assets { - let _ = self - .bus - .senders - .send_to_plugin(PluginInstruction::UnblockCliPipes(plugin_render_assets)) - .context("failed to unblock input pipe"); - } Ok(()) } @@ -2805,7 +2822,6 @@ impl Screen { self.render(None).non_fatal(); }, Err(e) => { - eprintln!("mouse event error: {:?}", e); log::error!("Failed to process MouseEvent: {}", e); }, } @@ -3265,6 +3281,9 @@ pub(crate) fn screen_thread_main( ScreenInstruction::Render => { screen.render(None)?; }, + ScreenInstruction::RenderToClients => { + screen.render_to_clients()?; + }, ScreenInstruction::NewPane( pid, initial_pane_title, diff --git a/zellij-server/src/unit/screen_tests.rs b/zellij-server/src/unit/screen_tests.rs index a626f147..6e0e4870 100644 --- a/zellij-server/src/unit/screen_tests.rs +++ b/zellij-server/src/unit/screen_tests.rs @@ -337,6 +337,7 @@ impl MockScreen { initial_layout: Option, initial_floating_panes_layout: Vec, ) -> std::thread::JoinHandle<()> { + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let mut config = self.config.clone(); config.options.advanced_mouse_actions = Some(self.advanced_mouse_actions); let client_attributes = self.client_attributes.clone(); @@ -387,6 +388,8 @@ impl MockScreen { let tab_name = None; let tab_index = self.last_opened_tab_index.map(|l| l + 1).unwrap_or(0); let should_change_focus_to_new_tab = true; + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async + // render let _ = self.to_screen.send(ScreenInstruction::NewTab( None, default_shell, @@ -408,6 +411,7 @@ impl MockScreen { (self.main_client_id, false), )); self.last_opened_tab_index = Some(tab_index); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render screen_thread } // same as the above function, but starts a plugin with a plugin alias @@ -536,6 +540,7 @@ impl MockScreen { let _ = self.to_screen.send(ScreenInstruction::Exit); let _ = self.to_server.send(ServerInstruction::KillSession); let _ = self.to_plugin.send(PluginInstruction::Exit); + let _ = self.to_background_jobs.send(BackgroundJob::Exit); for thread in threads { let _ = thread.join(); } @@ -621,11 +626,33 @@ impl MockScreen { let os_input = FakeInputOutput::default(); let config_options = Options::default(); let main_client_id = 1; + + std::thread::Builder::new() + .name("background_jobs_thread".to_string()) + .spawn({ + let to_screen = to_screen.clone(); + move || loop { + let (event, _err_ctx) = background_jobs_receiver + .recv() + .expect("failed to receive event on channel"); + match event { + BackgroundJob::RenderToClients => { + let _ = to_screen.send(ScreenInstruction::RenderToClients); + }, + BackgroundJob::Exit => { + break; + }, + _ => {}, + } + } + }) + .unwrap(); + MockScreen { main_client_id, pty_receiver: Some(pty_receiver), pty_writer_receiver: Some(pty_writer_receiver), - background_jobs_receiver: Some(background_jobs_receiver), + background_jobs_receiver: None, screen_receiver: Some(screen_receiver), server_receiver: Some(server_receiver), plugin_receiver: Some(plugin_receiver), @@ -1431,7 +1458,9 @@ pub fn mouse_hover_effect() { initial_layout.children_split_direction = SplitDirection::Vertical; initial_layout.children = vec![TiledPaneLayout::default(), TiledPaneLayout::default()]; let mut mock_screen = MockScreen::new(size); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for actions to be let screen_thread = mock_screen.run(Some(initial_layout), vec![]); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for actions to be let received_server_instructions = Arc::new(Mutex::new(vec![])); let server_receiver = mock_screen.server_receiver.take().unwrap(); let server_thread = log_actions_in_thread!( @@ -1781,7 +1810,9 @@ pub fn send_cli_resize_action_to_screen() { resize: Resize::Increase, direction: Some(Direction::Left), }; + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render send_cli_action_to_server(&session_metadata, resize_cli_action, client_id); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render mock_screen.teardown(vec![pty_writer_thread, screen_thread]); let snapshots = take_snapshots_and_cursor_coordinates_from_render_events( received_server_instructions.lock().unwrap().iter(), @@ -2254,6 +2285,7 @@ pub fn send_cli_page_scroll_up_action() { ); let page_scroll_up_action = CliAction::PageScrollUp; let mut pane_contents = String::new(); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render for i in 0..20 { pane_contents.push_str(&format!("fill pane up with something {}\n\r", i)); } @@ -2299,6 +2331,7 @@ pub fn send_cli_page_scroll_down_action() { for i in 0..20 { pane_contents.push_str(&format!("fill pane up with something {}\n\r", i)); } + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let _ = mock_screen.to_screen.send(ScreenInstruction::PtyBytes( 0, pane_contents.as_bytes().to_vec(), @@ -2306,10 +2339,13 @@ pub fn send_cli_page_scroll_down_action() { std::thread::sleep(std::time::Duration::from_millis(100)); // scroll up some + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render send_cli_action_to_server(&session_metadata, page_scroll_up_action.clone(), client_id); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render send_cli_action_to_server(&session_metadata, page_scroll_up_action.clone(), client_id); // scroll down + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render send_cli_action_to_server(&session_metadata, page_scroll_down_action, client_id); std::thread::sleep(std::time::Duration::from_millis(100)); mock_screen.teardown(vec![server_instruction, screen_thread]); @@ -2385,6 +2421,7 @@ pub fn send_cli_half_page_scroll_down_action() { let half_page_scroll_up_action = CliAction::HalfPageScrollUp; let half_page_scroll_down_action = CliAction::HalfPageScrollDown; let mut pane_contents = String::new(); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render for i in 0..20 { pane_contents.push_str(&format!("fill pane up with something {}\n\r", i)); } @@ -2400,11 +2437,13 @@ pub fn send_cli_half_page_scroll_down_action() { half_page_scroll_up_action.clone(), client_id, ); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render send_cli_action_to_server( &session_metadata, half_page_scroll_up_action.clone(), client_id, ); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render // scroll down send_cli_action_to_server(&session_metadata, half_page_scroll_down_action, client_id); @@ -3076,6 +3115,7 @@ pub fn send_cli_next_tab_action() { mock_screen.new_tab(second_tab_layout); let session_metadata = mock_screen.clone_session_metadata(); let screen_thread = mock_screen.run(Some(initial_layout), vec![]); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let received_server_instructions = Arc::new(Mutex::new(vec![])); let server_receiver = mock_screen.server_receiver.take().unwrap(); let server_thread = log_actions_in_thread!( @@ -3085,8 +3125,9 @@ pub fn send_cli_next_tab_action() { ); let goto_next_tab = CliAction::GoToNextTab; send_cli_action_to_server(&session_metadata, goto_next_tab, client_id); - std::thread::sleep(std::time::Duration::from_millis(100)); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render mock_screen.teardown(vec![server_thread, screen_thread]); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let snapshots = take_snapshots_and_cursor_coordinates_from_render_events( received_server_instructions.lock().unwrap().iter(), size, @@ -3524,7 +3565,7 @@ pub fn send_cli_launch_or_focus_plugin_action_when_plugin_is_already_loaded_for_ ); let snapshot_count = snapshots.len(); assert_eq!( - snapshot_count, 2, + snapshot_count, 3, "Another render was sent for focusing the already loaded plugin" ); for (cursor_coordinates, _snapshot) in snapshots.iter().skip(1) { @@ -3578,7 +3619,9 @@ pub fn screen_can_break_pane_to_a_new_tab() { initial_layout.children_split_direction = SplitDirection::Vertical; initial_layout.children = vec![pane_to_break_free, pane_to_stay]; let mut mock_screen = MockScreen::new(size); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let screen_thread = mock_screen.run(Some(initial_layout), vec![]); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let received_server_instructions = Arc::new(Mutex::new(vec![])); let server_receiver = mock_screen.server_receiver.take().unwrap(); let server_thread = log_actions_in_thread!( @@ -3677,7 +3720,9 @@ pub fn screen_can_break_floating_pane_to_a_new_tab() { initial_layout.children_split_direction = SplitDirection::Vertical; initial_layout.children = vec![pane_to_break_free]; let mut mock_screen = MockScreen::new(size); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let screen_thread = mock_screen.run(Some(initial_layout), floating_panes_layout.clone()); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let received_server_instructions = Arc::new(Mutex::new(vec![])); let server_receiver = mock_screen.server_receiver.take().unwrap(); let server_thread = log_actions_in_thread!( @@ -3750,7 +3795,9 @@ pub fn screen_can_break_plugin_pane_to_a_new_tab() { initial_layout.children_split_direction = SplitDirection::Vertical; initial_layout.children = vec![pane_to_break_free, pane_to_stay]; let mut mock_screen = MockScreen::new(size); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let screen_thread = mock_screen.run(Some(initial_layout), vec![]); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let received_server_instructions = Arc::new(Mutex::new(vec![])); let server_receiver = mock_screen.server_receiver.take().unwrap(); let server_thread = log_actions_in_thread!( @@ -3821,7 +3868,9 @@ pub fn screen_can_break_floating_plugin_pane_to_a_new_tab() { initial_layout.children_split_direction = SplitDirection::Vertical; initial_layout.children = vec![pane_to_break_free]; let mut mock_screen = MockScreen::new(size); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let screen_thread = mock_screen.run(Some(initial_layout), floating_panes_layout.clone()); + std::thread::sleep(std::time::Duration::from_millis(100)); // give time for the async render let received_server_instructions = Arc::new(Mutex::new(vec![])); let server_receiver = mock_screen.server_receiver.take().unwrap(); let server_thread = log_actions_in_thread!( diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_left-3.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_left-3.snap index bcac6ce6..d3d25148 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_left-3.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_left-3.snap @@ -1,26 +1,24 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 3079 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ pane_to_stay ────────────────────────────────────────────────────────────────┐ -01 (C): │ │ -02 (C): │ │ -03 (C): │ │ -04 (C): │ │ -05 (C): │ │ -06 (C): │ │ -07 (C): │ │ -08 (C): │ │ -09 (C): │ │ -10 (C): │ │ -11 (C): │ │ -12 (C): │ │ -13 (C): │ │ -14 (C): │ │ -15 (C): │ │ -16 (C): │ │ -17 (C): │ │ -18 (C): │ │ -19 (C): └──────────────────────────────────────────────────────────────────────────────┘ - +00 (C): ┌ pane_to_stay ────────────────────────┐┌ pane_to_break_free ──────────────────┐ +01 (C): │ ││ │ +02 (C): │ ││ │ +03 (C): │ ││ │ +04 (C): │ ││ │ +05 (C): │ ││ │ +06 (C): │ ││ │ +07 (C): │ ││ │ +08 (C): │ ││ │ +09 (C): │ ││ │ +10 (C): │ ││ │ +11 (C): │ ││ │ +12 (C): │ ││ │ +13 (C): │ ││ │ +14 (C): │ ││ │ +15 (C): │ ││ │ +16 (C): │ ││ │ +17 (C): │ ││ │ +18 (C): │ ││ │ +19 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_left-4.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_left-4.snap index 77c5a5a3..6f985b85 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_left-4.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_left-4.snap @@ -1,26 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 3649 -expression: "format!(\"{}\", snapshot)" +expression: "format!(\"{}\", snapshot_count)" --- -00 (C): ┌ pane_to_stay ────────────────────────┐┌ pane_to_break_free ──────────────────┐ -01 (C): │ ││ │ -02 (C): │ ││ │ -03 (C): │ ││ │ -04 (C): │ ││ │ -05 (C): │ ││ │ -06 (C): │ ││ │ -07 (C): │ ││ │ -08 (C): │ ││ │ -09 (C): │ ││ │ -10 (C): │ ││ │ -11 (C): │ ││ │ -12 (C): │ ││ │ -13 (C): │ ││ │ -14 (C): │ ││ │ -15 (C): │ ││ │ -16 (C): │ ││ │ -17 (C): │ ││ │ -18 (C): │ ││ │ -19 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - +3 diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_right-3.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_right-3.snap index d1f54bfe..d3d25148 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_right-3.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_right-3.snap @@ -1,26 +1,24 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 3032 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ pane_to_stay ────────────────────────────────────────────────────────────────┐ -01 (C): │ │ -02 (C): │ │ -03 (C): │ │ -04 (C): │ │ -05 (C): │ │ -06 (C): │ │ -07 (C): │ │ -08 (C): │ │ -09 (C): │ │ -10 (C): │ │ -11 (C): │ │ -12 (C): │ │ -13 (C): │ │ -14 (C): │ │ -15 (C): │ │ -16 (C): │ │ -17 (C): │ │ -18 (C): │ │ -19 (C): └──────────────────────────────────────────────────────────────────────────────┘ - +00 (C): ┌ pane_to_stay ────────────────────────┐┌ pane_to_break_free ──────────────────┐ +01 (C): │ ││ │ +02 (C): │ ││ │ +03 (C): │ ││ │ +04 (C): │ ││ │ +05 (C): │ ││ │ +06 (C): │ ││ │ +07 (C): │ ││ │ +08 (C): │ ││ │ +09 (C): │ ││ │ +10 (C): │ ││ │ +11 (C): │ ││ │ +12 (C): │ ││ │ +13 (C): │ ││ │ +14 (C): │ ││ │ +15 (C): │ ││ │ +16 (C): │ ││ │ +17 (C): │ ││ │ +18 (C): │ ││ │ +19 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_right-4.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_right-4.snap index ef8a4d90..6f985b85 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_right-4.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__screen_can_move_pane_to_a_new_tab_right-4.snap @@ -1,26 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 3601 -expression: "format!(\"{}\", snapshot)" +expression: "format!(\"{}\", snapshot_count)" --- -00 (C): ┌ pane_to_stay ────────────────────────┐┌ pane_to_break_free ──────────────────┐ -01 (C): │ ││ │ -02 (C): │ ││ │ -03 (C): │ ││ │ -04 (C): │ ││ │ -05 (C): │ ││ │ -06 (C): │ ││ │ -07 (C): │ ││ │ -08 (C): │ ││ │ -09 (C): │ ││ │ -10 (C): │ ││ │ -11 (C): │ ││ │ -12 (C): │ ││ │ -13 (C): │ ││ │ -14 (C): │ ││ │ -15 (C): │ ││ │ -16 (C): │ ││ │ -17 (C): │ ││ │ -18 (C): │ ││ │ -19 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - +3 diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap index 6ed151b4..01736b70 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap @@ -1,6 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 2389 -expression: "format!(\"{:?}\", * received_pty_instructions.lock().unwrap())" +expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())" --- -[SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some(false), Some("Editing: /file/to/edit"), None, false, ClientId(10)), UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), Exit] +[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some(false), Some("Editing: /file/to/edit"), None, false, ClientId(10)), Exit] diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap index a6ad8ea0..097e9f01 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap @@ -1,6 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 2427 -expression: "format!(\"{:?}\", * received_pty_instructions.lock().unwrap())" +expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())" --- -[SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: Some(100), cwd: Some("."), originating_plugin: None })), Some(false), Some("Editing: /file/to/edit"), None, false, ClientId(10)), UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), Exit] +[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: Some(100), cwd: Some("."), originating_plugin: None })), Some(false), Some("Editing: /file/to/edit"), None, false, ClientId(10)), Exit] diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap index fa4e0e3d..80db096e 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap @@ -1,6 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 2465 -expression: "format!(\"{:?}\", * received_pty_instructions.lock().unwrap())" +expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())" --- -[SpawnTerminalHorizontally(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), 10), UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), Exit] +[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminalHorizontally(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), 10), Exit] diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-2.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-2.snap index 36487ff3..96aaf171 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-2.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-2.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1702 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 4/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 9 ││ │ -02 (C): │fill pane up with something 10 ││ │ -03 (C): │fill pane up with something 11 ││ │ -04 (C): │fill pane up with something 12 ││ │ -05 (C): │fill pane up with something 13 ││ │ -06 (C): │fill pane up with something 14 ││ │ -07 (C): │fill pane up with something 15 ││ │ -08 (C): │fill pane up with something 16 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 0/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 13 ││ │ +02 (C): │fill pane up with something 14 ││ │ +03 (C): │fill pane up with something 15 ││ │ +04 (C): │fill pane up with something 16 ││ │ +05 (C): │fill pane up with something 17 ││ │ +06 (C): │fill pane up with something 18 ││ │ +07 (C): │fill pane up with something 19 ││ │ +08 (C): │ ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-3.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-3.snap index e0476fec..92fc1f4a 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-3.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-3.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1702 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 8/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 5 ││ │ -02 (C): │fill pane up with something 6 ││ │ -03 (C): │fill pane up with something 7 ││ │ -04 (C): │fill pane up with something 8 ││ │ -05 (C): │fill pane up with something 9 ││ │ -06 (C): │fill pane up with something 10 ││ │ -07 (C): │fill pane up with something 11 ││ │ -08 (C): │fill pane up with something 12 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 4/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 9 ││ │ +02 (C): │fill pane up with something 10 ││ │ +03 (C): │fill pane up with something 11 ││ │ +04 (C): │fill pane up with something 12 ││ │ +05 (C): │fill pane up with something 13 ││ │ +06 (C): │fill pane up with something 14 ││ │ +07 (C): │fill pane up with something 15 ││ │ +08 (C): │fill pane up with something 16 ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-4.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-4.snap index 36487ff3..1541218d 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-4.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-4.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1702 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 4/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 9 ││ │ -02 (C): │fill pane up with something 10 ││ │ -03 (C): │fill pane up with something 11 ││ │ -04 (C): │fill pane up with something 12 ││ │ -05 (C): │fill pane up with something 13 ││ │ -06 (C): │fill pane up with something 14 ││ │ -07 (C): │fill pane up with something 15 ││ │ -08 (C): │fill pane up with something 16 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 8/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 5 ││ │ +02 (C): │fill pane up with something 6 ││ │ +03 (C): │fill pane up with something 7 ││ │ +04 (C): │fill pane up with something 8 ││ │ +05 (C): │fill pane up with something 9 ││ │ +06 (C): │fill pane up with something 10 ││ │ +07 (C): │fill pane up with something 11 ││ │ +08 (C): │fill pane up with something 12 ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-5.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-5.snap index f5742603..92fc1f4a 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-5.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_down_action-5.snap @@ -1,6 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1704 -expression: "format!(\"{}\", snapshot_count)" +expression: "format!(\"{}\", snapshot)" --- -4 +00 (C): ┌ Pane #1 ────────────── SCROLL: 4/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 9 ││ │ +02 (C): │fill pane up with something 10 ││ │ +03 (C): │fill pane up with something 11 ││ │ +04 (C): │fill pane up with something 12 ││ │ +05 (C): │fill pane up with something 13 ││ │ +06 (C): │fill pane up with something 14 ││ │ +07 (C): │fill pane up with something 15 ││ │ +08 (C): │fill pane up with something 16 ││ │ +09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_up_action-2.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_up_action-2.snap index f400815e..96aaf171 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_up_action-2.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_up_action-2.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1639 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 4/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 9 ││ │ -02 (C): │fill pane up with something 10 ││ │ -03 (C): │fill pane up with something 11 ││ │ -04 (C): │fill pane up with something 12 ││ │ -05 (C): │fill pane up with something 13 ││ │ -06 (C): │fill pane up with something 14 ││ │ -07 (C): │fill pane up with something 15 ││ │ -08 (C): │fill pane up with something 16 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 0/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 13 ││ │ +02 (C): │fill pane up with something 14 ││ │ +03 (C): │fill pane up with something 15 ││ │ +04 (C): │fill pane up with something 16 ││ │ +05 (C): │fill pane up with something 17 ││ │ +06 (C): │fill pane up with something 18 ││ │ +07 (C): │fill pane up with something 19 ││ │ +08 (C): │ ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_up_action-3.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_up_action-3.snap index f33220f2..92fc1f4a 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_up_action-3.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_half_page_scroll_up_action-3.snap @@ -1,6 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1641 -expression: "format!(\"{}\", snapshot_count)" +expression: "format!(\"{}\", snapshot)" --- -2 +00 (C): ┌ Pane #1 ────────────── SCROLL: 4/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 9 ││ │ +02 (C): │fill pane up with something 10 ││ │ +03 (C): │fill pane up with something 11 ││ │ +04 (C): │fill pane up with something 12 ││ │ +05 (C): │fill pane up with something 13 ││ │ +06 (C): │fill pane up with something 14 ││ │ +07 (C): │fill pane up with something 15 ││ │ +08 (C): │fill pane up with something 16 ││ │ +09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap index bf271501..93561eb3 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap @@ -1,6 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 2222 -expression: "format!(\"{:?}\", * received_pty_instructions.lock().unwrap())" +expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())" --- -[SpawnTerminal(None, Some(false), None, None, false, ClientId(10)), UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), Exit] +[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(None, Some(false), None, None, false, ClientId(10)), Exit] diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_floating_pane_and_coordinates.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_floating_pane_and_coordinates.snap index 06cf752b..cb24294e 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_floating_pane_and_coordinates.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_floating_pane_and_coordinates.snap @@ -1,6 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 2371 -expression: "format!(\"{:?}\", * received_pty_instructions.lock().unwrap())" +expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())" --- -[SpawnTerminal(Some(RunCommand(RunCommand { command: "htop", args: [], cwd: Some("/some/folder"), hold_on_close: true, hold_on_start: false, originating_plugin: None })), Some(true), None, Some(FloatingPaneCoordinates { x: Some(Fixed(10)), y: None, width: Some(Percent(20)), height: None, pinned: None }), false, ClientId(10)), UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), Exit] +[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(RunCommand(RunCommand { command: "htop", args: [], cwd: Some("/some/folder"), hold_on_close: true, hold_on_start: false, originating_plugin: None })), Some(true), None, Some(FloatingPaneCoordinates { x: Some(Fixed(10)), y: None, width: Some(Percent(20)), height: None, pinned: None }), false, ClientId(10)), Exit] diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap index 50d0d59c..a42fe8e1 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap @@ -1,6 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1869 -expression: "format!(\"{:?}\", * received_pty_instructions.lock().unwrap())" +expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())" --- -[SpawnTerminalVertically(None, None, 10), UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), Exit] +[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminalVertically(None, None, 10), Exit] diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-2.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-2.snap index 813e0411..96aaf171 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-2.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-2.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1593 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 9/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 4 ││ │ -02 (C): │fill pane up with something 5 ││ │ -03 (C): │fill pane up with something 6 ││ │ -04 (C): │fill pane up with something 7 ││ │ -05 (C): │fill pane up with something 8 ││ │ -06 (C): │fill pane up with something 9 ││ │ -07 (C): │fill pane up with something 10 ││ │ -08 (C): │fill pane up with something 11 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 0/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 13 ││ │ +02 (C): │fill pane up with something 14 ││ │ +03 (C): │fill pane up with something 15 ││ │ +04 (C): │fill pane up with something 16 ││ │ +05 (C): │fill pane up with something 17 ││ │ +06 (C): │fill pane up with something 18 ││ │ +07 (C): │fill pane up with something 19 ││ │ +08 (C): │ ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-3.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-3.snap index c570d8d7..749019a5 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-3.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-3.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1593 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ───────────── SCROLL: 13/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 0 ││ │ -02 (C): │fill pane up with something 1 ││ │ -03 (C): │fill pane up with something 2 ││ │ -04 (C): │fill pane up with something 3 ││ │ -05 (C): │fill pane up with something 4 ││ │ -06 (C): │fill pane up with something 5 ││ │ -07 (C): │fill pane up with something 6 ││ │ -08 (C): │fill pane up with something 7 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 9/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 4 ││ │ +02 (C): │fill pane up with something 5 ││ │ +03 (C): │fill pane up with something 6 ││ │ +04 (C): │fill pane up with something 7 ││ │ +05 (C): │fill pane up with something 8 ││ │ +06 (C): │fill pane up with something 9 ││ │ +07 (C): │fill pane up with something 10 ││ │ +08 (C): │fill pane up with something 11 ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-4.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-4.snap index 3c606aa7..da18a425 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-4.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-4.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1593 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 5/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 8 ││ │ -02 (C): │fill pane up with something 9 ││ │ -03 (C): │fill pane up with something 10 ││ │ -04 (C): │fill pane up with something 11 ││ │ -05 (C): │fill pane up with something 12 ││ │ -06 (C): │fill pane up with something 13 ││ │ -07 (C): │fill pane up with something 14 ││ │ -08 (C): │fill pane up with something 15 ││ │ +00 (C): ┌ Pane #1 ───────────── SCROLL: 13/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 0 ││ │ +02 (C): │fill pane up with something 1 ││ │ +03 (C): │fill pane up with something 2 ││ │ +04 (C): │fill pane up with something 3 ││ │ +05 (C): │fill pane up with something 4 ││ │ +06 (C): │fill pane up with something 5 ││ │ +07 (C): │fill pane up with something 6 ││ │ +08 (C): │fill pane up with something 7 ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-5.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-5.snap index e9a17763..492ab5ec 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-5.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_down_action-5.snap @@ -1,6 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1595 -expression: "format!(\"{}\", snapshot_count)" +expression: "format!(\"{}\", snapshot)" --- -4 +00 (C): ┌ Pane #1 ────────────── SCROLL: 5/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 8 ││ │ +02 (C): │fill pane up with something 9 ││ │ +03 (C): │fill pane up with something 10 ││ │ +04 (C): │fill pane up with something 11 ││ │ +05 (C): │fill pane up with something 12 ││ │ +06 (C): │fill pane up with something 13 ││ │ +07 (C): │fill pane up with something 14 ││ │ +08 (C): │fill pane up with something 15 ││ │ +09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_up_action-2.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_up_action-2.snap index 75b3e602..96aaf171 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_up_action-2.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_up_action-2.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1530 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 9/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 4 ││ │ -02 (C): │fill pane up with something 5 ││ │ -03 (C): │fill pane up with something 6 ││ │ -04 (C): │fill pane up with something 7 ││ │ -05 (C): │fill pane up with something 8 ││ │ -06 (C): │fill pane up with something 9 ││ │ -07 (C): │fill pane up with something 10 ││ │ -08 (C): │fill pane up with something 11 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 0/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 13 ││ │ +02 (C): │fill pane up with something 14 ││ │ +03 (C): │fill pane up with something 15 ││ │ +04 (C): │fill pane up with something 16 ││ │ +05 (C): │fill pane up with something 17 ││ │ +06 (C): │fill pane up with something 18 ││ │ +07 (C): │fill pane up with something 19 ││ │ +08 (C): │ ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_up_action-3.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_up_action-3.snap index 661ae9b1..749019a5 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_up_action-3.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_page_scroll_up_action-3.snap @@ -1,6 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1532 -expression: "format!(\"{}\", snapshot_count)" +expression: "format!(\"{}\", snapshot)" --- -2 +00 (C): ┌ Pane #1 ────────────── SCROLL: 9/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 4 ││ │ +02 (C): │fill pane up with something 5 ││ │ +03 (C): │fill pane up with something 6 ││ │ +04 (C): │fill pane up with something 7 ││ │ +05 (C): │fill pane up with something 8 ││ │ +06 (C): │fill pane up with something 9 ││ │ +07 (C): │fill pane up with something 10 ││ │ +08 (C): │fill pane up with something 11 ││ │ +09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen-2.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen-2.snap index da2e2a7b..94c79ed1 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen-2.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen-2.snap @@ -1,26 +1,24 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 924 expression: "format!(\"{}\", snapshot)" --- -00 (C): -01 (C): -02 (C): -03 (C): -04 (C): -05 (C): -06 (C): -07 (C): -08 (C): -09 (C): -10 (C): -11 (C): -12 (C): -13 (C): -14 (C): -15 (C): -16 (C): -17 (C): -18 (C): -19 (C): - +00 (C): ┌ Pane #1 ─────────────────────────┐┌ Pane #2 ─────────────────────────────────┐ +01 (C): │ ││ │ +02 (C): │ ││ │ +03 (C): │ ││ │ +04 (C): │ ││ │ +05 (C): │ ││ │ +06 (C): │ ││ │ +07 (C): │ ││ │ +08 (C): │ ││ │ +09 (C): │ ││ │ +10 (C): │ ││ │ +11 (C): │ ││ │ +12 (C): │ ││ │ +13 (C): │ ││ │ +14 (C): │ ││ │ +15 (C): │ ││ │ +16 (C): │ ││ │ +17 (C): │ ││ │ +18 (C): │ ││ │ +19 (C): └──────────────────────────────────┘└──────────────────────────────────────────┘ diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen-3.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen-3.snap index 4325fbb4..45361b56 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen-3.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen-3.snap @@ -1,26 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 924 -expression: "format!(\"{}\", snapshot)" +expression: "format!(\"{}\", snapshot_count)" --- -00 (C): ┌ Pane #1 ─────────────────────────┐┌ Pane #2 ─────────────────────────────────┐ -01 (C): │ ││ │ -02 (C): │ ││ │ -03 (C): │ ││ │ -04 (C): │ ││ │ -05 (C): │ ││ │ -06 (C): │ ││ │ -07 (C): │ ││ │ -08 (C): │ ││ │ -09 (C): │ ││ │ -10 (C): │ ││ │ -11 (C): │ ││ │ -12 (C): │ ││ │ -13 (C): │ ││ │ -14 (C): │ ││ │ -15 (C): │ ││ │ -16 (C): │ ││ │ -17 (C): │ ││ │ -18 (C): │ ││ │ -19 (C): └──────────────────────────────────┘└──────────────────────────────────────────┘ - +2 diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen.snap index 3b34c47d..69ea0a2e 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_resize_action_to_screen.snap @@ -1,6 +1,24 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 904 -expression: "format!(\"{}\", snapshot_count)" +expression: "format!(\"{}\", snapshot)" --- -0 +00 (C): ┌ Pane #1 ─────────────────────────────┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │ ││ │ +02 (C): │ ││ │ +03 (C): │ ││ │ +04 (C): │ ││ │ +05 (C): │ ││ │ +06 (C): │ ││ │ +07 (C): │ ││ │ +08 (C): │ ││ │ +09 (C): │ ││ │ +10 (C): │ ││ │ +11 (C): │ ││ │ +12 (C): │ ││ │ +13 (C): │ ││ │ +14 (C): │ ││ │ +15 (C): │ ││ │ +16 (C): │ ││ │ +17 (C): │ ││ │ +18 (C): │ ││ │ +19 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_down_action-2.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_down_action-2.snap index 2435355f..96aaf171 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_down_action-2.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_down_action-2.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1407 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 1/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 12 ││ │ -02 (C): │fill pane up with something 13 ││ │ -03 (C): │fill pane up with something 14 ││ │ -04 (C): │fill pane up with something 15 ││ │ -05 (C): │fill pane up with something 16 ││ │ -06 (C): │fill pane up with something 17 ││ │ -07 (C): │fill pane up with something 18 ││ │ -08 (C): │fill pane up with something 19 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 0/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 13 ││ │ +02 (C): │fill pane up with something 14 ││ │ +03 (C): │fill pane up with something 15 ││ │ +04 (C): │fill pane up with something 16 ││ │ +05 (C): │fill pane up with something 17 ││ │ +06 (C): │fill pane up with something 18 ││ │ +07 (C): │fill pane up with something 19 ││ │ +08 (C): │ ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_down_action-4.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_down_action-4.snap index e2f43ec0..6f985b85 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_down_action-4.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_down_action-4.snap @@ -1,16 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1407 -expression: "format!(\"{}\", snapshot)" +expression: "format!(\"{}\", snapshot_count)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 3/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 10 ││ │ -02 (C): │fill pane up with something 11 ││ │ -03 (C): │fill pane up with something 12 ││ │ -04 (C): │fill pane up with something 13 ││ │ -05 (C): │fill pane up with something 14 ││ │ -06 (C): │fill pane up with something 15 ││ │ -07 (C): │fill pane up with something 16 ││ │ -08 (C): │fill pane up with something 17 ││ │ -09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - +3 diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-2.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-2.snap index 20c9331f..96aaf171 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-2.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-2.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1484 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 1/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 12 ││ │ -02 (C): │fill pane up with something 13 ││ │ -03 (C): │fill pane up with something 14 ││ │ -04 (C): │fill pane up with something 15 ││ │ -05 (C): │fill pane up with something 16 ││ │ -06 (C): │fill pane up with something 17 ││ │ -07 (C): │fill pane up with something 18 ││ │ -08 (C): │fill pane up with something 19 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 0/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 13 ││ │ +02 (C): │fill pane up with something 14 ││ │ +03 (C): │fill pane up with something 15 ││ │ +04 (C): │fill pane up with something 16 ││ │ +05 (C): │fill pane up with something 17 ││ │ +06 (C): │fill pane up with something 18 ││ │ +07 (C): │fill pane up with something 19 ││ │ +08 (C): │ ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-3.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-3.snap index 5685baed..96aaf171 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-3.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-3.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1484 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 2/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 11 ││ │ -02 (C): │fill pane up with something 12 ││ │ -03 (C): │fill pane up with something 13 ││ │ -04 (C): │fill pane up with something 14 ││ │ -05 (C): │fill pane up with something 15 ││ │ -06 (C): │fill pane up with something 16 ││ │ -07 (C): │fill pane up with something 17 ││ │ -08 (C): │fill pane up with something 18 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 0/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 13 ││ │ +02 (C): │fill pane up with something 14 ││ │ +03 (C): │fill pane up with something 15 ││ │ +04 (C): │fill pane up with something 16 ││ │ +05 (C): │fill pane up with something 17 ││ │ +06 (C): │fill pane up with something 18 ││ │ +07 (C): │fill pane up with something 19 ││ │ +08 (C): │ ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-4.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-4.snap index 5ae26d91..6f985b85 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-4.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_bottom_action-4.snap @@ -1,16 +1,5 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1484 -expression: "format!(\"{}\", snapshot)" +expression: "format!(\"{}\", snapshot_count)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 3/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 10 ││ │ -02 (C): │fill pane up with something 11 ││ │ -03 (C): │fill pane up with something 12 ││ │ -04 (C): │fill pane up with something 13 ││ │ -05 (C): │fill pane up with something 14 ││ │ -06 (C): │fill pane up with something 15 ││ │ -07 (C): │fill pane up with something 16 ││ │ -08 (C): │fill pane up with something 17 ││ │ -09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - +3 diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-2.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-2.snap index e0a5a3fd..96aaf171 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-2.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-2.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1565 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ───────────── SCROLL: 13/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 0 ││ │ -02 (C): │fill pane up with something 1 ││ │ -03 (C): │fill pane up with something 2 ││ │ -04 (C): │fill pane up with something 3 ││ │ -05 (C): │fill pane up with something 4 ││ │ -06 (C): │fill pane up with something 5 ││ │ -07 (C): │fill pane up with something 6 ││ │ -08 (C): │fill pane up with something 7 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 0/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 13 ││ │ +02 (C): │fill pane up with something 14 ││ │ +03 (C): │fill pane up with something 15 ││ │ +04 (C): │fill pane up with something 16 ││ │ +05 (C): │fill pane up with something 17 ││ │ +06 (C): │fill pane up with something 18 ││ │ +07 (C): │fill pane up with something 19 ││ │ +08 (C): │ ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-3.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-3.snap index 526a865c..da18a425 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-3.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-3.snap @@ -1,6 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1567 -expression: "format!(\"{}\", snapshot_count)" +expression: "format!(\"{}\", snapshot)" --- -2 +00 (C): ┌ Pane #1 ───────────── SCROLL: 13/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 0 ││ │ +02 (C): │fill pane up with something 1 ││ │ +03 (C): │fill pane up with something 2 ││ │ +04 (C): │fill pane up with something 3 ││ │ +05 (C): │fill pane up with something 4 ││ │ +06 (C): │fill pane up with something 5 ││ │ +07 (C): │fill pane up with something 6 ││ │ +08 (C): │fill pane up with something 7 ││ │ +09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-4.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-4.snap new file mode 100644 index 00000000..6f985b85 --- /dev/null +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_to_top_action-4.snap @@ -0,0 +1,5 @@ +--- +source: zellij-server/src/./unit/screen_tests.rs +expression: "format!(\"{}\", snapshot_count)" +--- +3 diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_up_action-2.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_up_action-2.snap index d7056c6e..96aaf171 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_up_action-2.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_scroll_up_action-2.snap @@ -1,16 +1,14 @@ --- source: zellij-server/src/./unit/screen_tests.rs -assertion_line: 1327 expression: "format!(\"{}\", snapshot)" --- -00 (C): ┌ Pane #1 ────────────── SCROLL: 1/13 ┐┌ Pane #2 ─────────────────────────────┐ -01 (C): │fill pane up with something 12 ││ │ -02 (C): │fill pane up with something 13 ││ │ -03 (C): │fill pane up with something 14 ││ │ -04 (C): │fill pane up with something 15 ││ │ -05 (C): │fill pane up with something 16 ││ │ -06 (C): │fill pane up with something 17 ││ │ -07 (C): │fill pane up with something 18 ││ │ -08 (C): │fill pane up with something 19 ││ │ +00 (C): ┌ Pane #1 ────────────── SCROLL: 0/13 ┐┌ Pane #2 ─────────────────────────────┐ +01 (C): │fill pane up with something 13 ││ │ +02 (C): │fill pane up with something 14 ││ │ +03 (C): │fill pane up with something 15 ││ │ +04 (C): │fill pane up with something 16 ││ │ +05 (C): │fill pane up with something 17 ││ │ +06 (C): │fill pane up with something 18 ││ │ +07 (C): │fill pane up with something 19 ││ │ +08 (C): │ ││ │ 09 (C): └──────────────────────────────────────┘└──────────────────────────────────────┘ - diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_toggle_active_tab_sync_action.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_toggle_active_tab_sync_action.snap index dab5b941..97a33ab7 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_toggle_active_tab_sync_action.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_toggle_active_tab_sync_action.snap @@ -2,4 +2,4 @@ source: zellij-server/src/./unit/screen_tests.rs expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())" --- -[StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ApplyCachedResizes, ResizePty(0, 58, 18, None, None), ResizePty(1, 59, 18, None, None), ResizePty(0, 58, 18, None, None), ResizePty(1, 59, 18, None, None), ResizePty(0, 58, 18, None, None), ResizePty(1, 59, 18, None, None), ResizePty(0, 58, 18, None, None), ResizePty(1, 59, 18, None, None), ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ApplyCachedResizes, ApplyCachedResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, Write([102, 111, 111], 0), Write([102, 111, 111], 1), ApplyCachedResizes, Exit] +[StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ApplyCachedResizes, ResizePty(0, 58, 18, None, None), ResizePty(1, 59, 18, None, None), ResizePty(0, 58, 18, None, None), ResizePty(1, 59, 18, None, None), ResizePty(0, 58, 18, None, None), ResizePty(1, 59, 18, None, None), ResizePty(0, 58, 18, None, None), ResizePty(1, 59, 18, None, None), ResizePty(0, 59, 18, None, None), ResizePty(1, 58, 18, None, None), ApplyCachedResizes, ApplyCachedResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, Write([102, 111, 111], 0), Write([102, 111, 111], 1), ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, Exit] diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_write_action_to_screen.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_write_action_to_screen.snap index 79a0b61c..23ecdce1 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_write_action_to_screen.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_write_action_to_screen.snap @@ -2,4 +2,4 @@ source: zellij-server/src/./unit/screen_tests.rs expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())" --- -[StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ApplyCachedResizes, ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ApplyCachedResizes, ApplyCachedResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, Write([102, 111, 111], 0), ApplyCachedResizes, Exit] +[StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ApplyCachedResizes, ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ApplyCachedResizes, ApplyCachedResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, Write([102, 111, 111], 0), ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, Exit] diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_write_chars_action_to_screen.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_write_chars_action_to_screen.snap index 995d89bc..938d5ce2 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_write_chars_action_to_screen.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_write_chars_action_to_screen.snap @@ -2,4 +2,4 @@ source: zellij-server/src/./unit/screen_tests.rs expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())" --- -[StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ApplyCachedResizes, ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ApplyCachedResizes, ApplyCachedResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, Write([105, 110, 112, 117, 116, 32, 102, 114, 111, 109, 32, 116, 104, 101, 32, 99, 108, 105], 0), ApplyCachedResizes, Exit] +[StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ApplyCachedResizes, ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ResizePty(0, 119, 18, None, None), ApplyCachedResizes, ApplyCachedResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, StartCachingResizes, Write([105, 110, 112, 117, 116, 32, 102, 114, 111, 109, 32, 116, 104, 101, 32, 99, 108, 105], 0), ApplyCachedResizes, StartCachingResizes, ApplyCachedResizes, Exit] diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs index 4359082f..4d647eee 100644 --- a/zellij-utils/src/errors.rs +++ b/zellij-utils/src/errors.rs @@ -213,6 +213,7 @@ pub enum ScreenContext { HandlePtyBytes, PluginBytes, Render, + RenderToClients, NewPane, OpenInPlaceEditor, ToggleFloatingPanes,