From 81ca742a694fdfebc8efcb0a01490744f259a4e1 Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Thu, 22 Jan 2026 11:45:16 +0100 Subject: [PATCH] Allow disabling OSC8 link generation (#4624) * implementation * rustfmt * add pr --- CHANGELOG.md | 1 + src/tests/e2e/remote_runner.rs | 1 + zellij-server/src/output/mod.rs | 38 ++- zellij-server/src/output/unit/output_tests.rs | 10 +- zellij-server/src/panes/grid.rs | 10 +- zellij-server/src/panes/plugin_pane.rs | 2 + zellij-server/src/panes/terminal_pane.rs | 2 + zellij-server/src/panes/unit/grid_tests.rs | 228 ++++++++++++++++++ .../src/panes/unit/search_in_pane_tests.rs | 2 + .../src/panes/unit/terminal_pane_tests.rs | 24 ++ zellij-server/src/screen.rs | 8 + zellij-server/src/tab/layout_applier.rs | 5 + zellij-server/src/tab/mod.rs | 15 ++ .../src/tab/unit/layout_applier_tests.rs | 118 +++++++++ .../src/tab/unit/tab_integration_tests.rs | 24 +- zellij-server/src/tab/unit/tab_tests.rs | 6 + zellij-server/src/unit/screen_tests.rs | 4 + zellij-utils/assets/config/default.kdl | 5 + .../prost_ipc/client_server_contract.rs | 2 + .../client_server_contract/common_types.proto | 1 + zellij-utils/src/input/options.rs | 9 + zellij-utils/src/ipc/protobuf_conversion.rs | 2 + zellij-utils/src/ipc/tests/roundtrip_tests.rs | 1 + zellij-utils/src/kdl/mod.rs | 57 +++++ ...efault_assets_to_string_with_comments.snap | 7 + ...onfig_options_to_string_with_comments.snap | 7 + ...cli_arguments_override_config_options.snap | 1 + ...cli_arguments_override_layout_options.snap | 1 + ...efault_config_with_no_cli_arguments-3.snap | 1 + ..._default_config_with_no_cli_arguments.snap | 1 + ...out_env_vars_override_config_env_vars.snap | 1 + ...out_keybinds_override_config_keybinds.snap | 1 + ...ayout_options_override_config_options.snap | 1 + ..._layout_themes_override_config_themes.snap | 1 + ..._ui_config_overrides_config_ui_config.snap | 1 + 35 files changed, 586 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3bda16fe..c20d9a041 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * fix: query webserver through ipc rather than https (https://github.com/zellij-org/zellij/pull/4620) * feat: add web client `base_url` option (https://github.com/zellij-org/zellij/pull/4409) * fix: breaking floating panes to a new tab no longer keeps them floating (https://github.com/zellij-org/zellij/pull/4622) +* fix: allow disabling automatic OSC8 hyperlink formatting (https://github.com/zellij-org/zellij/pull/4624) ## [0.43.1] - 2025-08-08 diff --git a/src/tests/e2e/remote_runner.rs b/src/tests/e2e/remote_runner.rs index d4663ac55..1fa5d7033 100644 --- a/src/tests/e2e/remote_runner.rs +++ b/src/tests/e2e/remote_runner.rs @@ -272,6 +272,7 @@ fn read_from_channel( debug, arrow_fonts, styled_underlines, + true, // osc8_hyperlinks explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index diff --git a/zellij-server/src/output/mod.rs b/zellij-server/src/output/mod.rs index 0b23d9bba..180514ae7 100644 --- a/zellij-server/src/output/mod.rs +++ b/zellij-server/src/output/mod.rs @@ -66,6 +66,7 @@ fn write_changed_styles( current_character_styles: CharacterStyles, chunk_changed_colors: Option<[Option; 256]>, link_handler: Option<&std::cell::Ref>, + osc8_hyperlinks: bool, vte_output: &mut String, ) -> Result<()> { let err_context = "failed to format changed styles to VTE string"; @@ -73,10 +74,14 @@ fn write_changed_styles( if let Some(new_styles) = character_styles.update_and_return_diff(¤t_character_styles, chunk_changed_colors) { - if let Some(osc8_link) = - link_handler.and_then(|l_h| l_h.output_osc8(new_styles.link_anchor)) - { - write!(vte_output, "{}{}", new_styles, osc8_link).context(err_context)?; + if osc8_hyperlinks { + if let Some(osc8_link) = + link_handler.and_then(|l_h| l_h.output_osc8(new_styles.link_anchor)) + { + write!(vte_output, "{}{}", new_styles, osc8_link).context(err_context)?; + } else { + write!(vte_output, "{}", new_styles).context(err_context)?; + } } else { write!(vte_output, "{}", new_styles).context(err_context)?; } @@ -89,6 +94,7 @@ fn serialize_chunks_with_newlines( _sixel_chunks: Option<&Vec>, // TODO: fix this sometime link_handler: Option<&mut Rc>>, styled_underlines: bool, + osc8_hyperlinks: bool, max_size: Option, ) -> Result { let err_context = || "failed to serialize input chunks".to_string(); @@ -129,6 +135,7 @@ fn serialize_chunks_with_newlines( current_character_styles, chunk_changed_colors, link_handler.as_ref(), + osc8_hyperlinks, &mut vte_output, ) .with_context(err_context)?; @@ -144,6 +151,7 @@ fn serialize_chunks( link_handler: Option<&mut Rc>>, sixel_image_store: Option<&mut SixelImageStore>, styled_underlines: bool, + osc8_hyperlinks: bool, max_size: Option, ) -> Result { let err_context = || "failed to serialize input chunks".to_string(); @@ -186,6 +194,7 @@ fn serialize_chunks( current_character_styles, chunk_changed_colors, link_handler.as_ref(), + osc8_hyperlinks, &mut vte_output, ) .with_context(err_context)?; @@ -297,6 +306,7 @@ pub struct Output { character_cell_size: Rc>>, floating_panes_stack: Option, styled_underlines: bool, + osc8_hyperlinks: bool, pane_render_report: PaneRenderReport, cursor_coordinates: Option<(usize, usize)>, } @@ -306,11 +316,13 @@ impl Output { sixel_image_store: Rc>, character_cell_size: Rc>>, styled_underlines: bool, + osc8_hyperlinks: bool, ) -> Self { Output { sixel_image_store, character_cell_size, styled_underlines, + osc8_hyperlinks, ..Default::default() } } @@ -474,6 +486,7 @@ impl Output { self.link_handler.as_mut(), Some(&mut self.sixel_image_store.borrow_mut()), self.styled_underlines, + self.osc8_hyperlinks, None, // No size constraints for regular rendering ) .with_context(err_context)?, @@ -541,6 +554,7 @@ impl Output { self.link_handler.as_mut(), Some(&mut self.sixel_image_store.borrow_mut()), self.styled_underlines, + self.osc8_hyperlinks, max_size, ) .with_context(err_context)?, @@ -1083,7 +1097,12 @@ impl OutputBuffer { self.changed_lines.clear(); self.should_update_all_lines = false; } - pub fn serialize(&self, viewport: &[Row], max_size: Option) -> Result { + pub fn serialize( + &self, + viewport: &[Row], + osc8_hyperlinks: bool, + max_size: Option, + ) -> Result { let mut chunks = Vec::new(); for (line_index, line) in viewport.iter().enumerate() { let terminal_characters = @@ -1093,7 +1112,14 @@ impl OutputBuffer { let y = line_index; chunks.push(CharacterChunk::new(terminal_characters, x, y)); } - serialize_chunks_with_newlines(chunks, None, None, self.styled_underlines, max_size) + serialize_chunks_with_newlines( + chunks, + None, + None, + self.styled_underlines, + osc8_hyperlinks, + max_size, + ) } pub fn changed_chunks_in_viewport( &self, diff --git a/zellij-server/src/output/unit/output_tests.rs b/zellij-server/src/output/unit/output_tests.rs index caa42ef4c..4a25748d9 100644 --- a/zellij-server/src/output/unit/output_tests.rs +++ b/zellij-server/src/output/unit/output_tests.rs @@ -15,7 +15,13 @@ fn create_test_output() -> Output { width: 10, }))); let styled_underlines = true; - Output::new(sixel_image_store, character_cell_size, styled_underlines) + let osc8_hyperlinks = true; + Output::new( + sixel_image_store, + character_cell_size, + styled_underlines, + osc8_hyperlinks, + ) } /// Helper to create a simple CharacterChunk with text @@ -846,7 +852,7 @@ fn test_output_buffer_serialize() { let row = Row::from_columns(columns); let viewport = vec![row]; - let result = buffer.serialize(&viewport, None).unwrap(); + let result = buffer.serialize(&viewport, true, None).unwrap(); // Should contain the character and newlines/carriage returns assert!(result.contains('A'), "Serialized output should contain 'A'"); diff --git a/zellij-server/src/panes/grid.rs b/zellij-server/src/panes/grid.rs index 77329f2b7..4d17972ed 100644 --- a/zellij-server/src/panes/grid.rs +++ b/zellij-server/src/panes/grid.rs @@ -359,6 +359,7 @@ pub struct Grid { debug: bool, arrow_fonts: bool, styled_underlines: bool, + osc8_hyperlinks: bool, pub supports_kitty_keyboard_protocol: bool, // has the app requested kitty keyboard support? explicitly_disable_kitty_keyboard_protocol: bool, // has kitty keyboard support been explicitly // disabled by user config? @@ -492,6 +493,7 @@ impl Grid { debug: bool, arrow_fonts: bool, styled_underlines: bool, + osc8_hyperlinks: bool, explicitly_disable_kitty_keyboard_protocol: bool, ) -> Self { let sixel_grid = SixelGrid::new(character_cell_size.clone(), sixel_image_store); @@ -547,6 +549,7 @@ impl Grid { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, lock_renders: false, supports_kitty_keyboard_protocol: false, explicitly_disable_kitty_keyboard_protocol, @@ -1110,10 +1113,13 @@ impl Grid { to_serialize.push(line.clone()) } self.output_buffer - .serialize(to_serialize.as_slice(), None) + .serialize(to_serialize.as_slice(), self.osc8_hyperlinks, None) .ok() }, - None => self.output_buffer.serialize(&self.viewport, None).ok(), + None => self + .output_buffer + .serialize(&self.viewport, self.osc8_hyperlinks, None) + .ok(), } } pub fn render( diff --git a/zellij-server/src/panes/plugin_pane.rs b/zellij-server/src/panes/plugin_pane.rs index a30f49ae3..b318f5393 100644 --- a/zellij-server/src/panes/plugin_pane.rs +++ b/zellij-server/src/panes/plugin_pane.rs @@ -48,6 +48,7 @@ macro_rules! get_or_create_grid { ($self:ident, $client_id:ident) => {{ let rows = $self.get_content_rows(); let cols = $self.get_content_columns(); + let osc8_hyperlinks = true; // N/A for plugins, always enabled let explicitly_disable_kitty_keyboard_protocol = false; // N/A for plugins $self.grids.entry($client_id).or_insert_with(|| { @@ -63,6 +64,7 @@ macro_rules! get_or_create_grid { $self.debug, $self.arrow_fonts, $self.styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); grid.hide_cursor(); diff --git a/zellij-server/src/panes/terminal_pane.rs b/zellij-server/src/panes/terminal_pane.rs index 881fefe95..2b1708fe7 100644 --- a/zellij-server/src/panes/terminal_pane.rs +++ b/zellij-server/src/panes/terminal_pane.rs @@ -941,6 +941,7 @@ impl TerminalPane { debug: bool, arrow_fonts: bool, styled_underlines: bool, + osc8_hyperlinks: bool, explicitly_disable_keyboard_protocol: bool, mut notification_end: Option, ) -> TerminalPane { @@ -958,6 +959,7 @@ impl TerminalPane { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_keyboard_protocol, ); if let Some(notification_end) = notification_end.as_mut() { diff --git a/zellij-server/src/panes/unit/grid_tests.rs b/zellij-server/src/panes/unit/grid_tests.rs index 32a7cdd90..7128bc076 100644 --- a/zellij-server/src/panes/unit/grid_tests.rs +++ b/zellij-server/src/panes/unit/grid_tests.rs @@ -32,6 +32,7 @@ fn vttest1_0() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -45,6 +46,7 @@ fn vttest1_0() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest1-0"; @@ -63,6 +65,7 @@ fn vttest1_1() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -76,6 +79,7 @@ fn vttest1_1() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest1-1"; @@ -94,6 +98,7 @@ fn vttest1_2() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -107,6 +112,7 @@ fn vttest1_2() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest1-2"; @@ -125,6 +131,7 @@ fn vttest1_3() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -138,6 +145,7 @@ fn vttest1_3() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest1-3"; @@ -156,6 +164,7 @@ fn vttest1_4() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -169,6 +178,7 @@ fn vttest1_4() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest1-4"; @@ -187,6 +197,7 @@ fn vttest1_5() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -200,6 +211,7 @@ fn vttest1_5() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest1-5"; @@ -218,6 +230,7 @@ fn vttest2_0() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -231,6 +244,7 @@ fn vttest2_0() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-0"; @@ -249,6 +263,7 @@ fn vttest2_1() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -262,6 +277,7 @@ fn vttest2_1() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-1"; @@ -280,6 +296,7 @@ fn vttest2_2() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -293,6 +310,7 @@ fn vttest2_2() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-2"; @@ -311,6 +329,7 @@ fn vttest2_3() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -324,6 +343,7 @@ fn vttest2_3() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-3"; @@ -342,6 +362,7 @@ fn vttest2_4() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -355,6 +376,7 @@ fn vttest2_4() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-4"; @@ -373,6 +395,7 @@ fn vttest2_5() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -386,6 +409,7 @@ fn vttest2_5() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-5"; @@ -404,6 +428,7 @@ fn vttest2_6() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -417,6 +442,7 @@ fn vttest2_6() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-6"; @@ -435,6 +461,7 @@ fn vttest2_7() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -448,6 +475,7 @@ fn vttest2_7() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-7"; @@ -466,6 +494,7 @@ fn vttest2_8() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -479,6 +508,7 @@ fn vttest2_8() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-8"; @@ -497,6 +527,7 @@ fn vttest2_9() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -510,6 +541,7 @@ fn vttest2_9() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-9"; @@ -528,6 +560,7 @@ fn vttest2_10() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -541,6 +574,7 @@ fn vttest2_10() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-10"; @@ -559,6 +593,7 @@ fn vttest2_11() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -572,6 +607,7 @@ fn vttest2_11() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-11"; @@ -590,6 +626,7 @@ fn vttest2_12() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -603,6 +640,7 @@ fn vttest2_12() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-12"; @@ -621,6 +659,7 @@ fn vttest2_13() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -634,6 +673,7 @@ fn vttest2_13() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-13"; @@ -652,6 +692,7 @@ fn vttest2_14() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -665,6 +706,7 @@ fn vttest2_14() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest2-14"; @@ -683,6 +725,7 @@ fn vttest3_0() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -696,6 +739,7 @@ fn vttest3_0() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest3-0"; @@ -714,6 +758,7 @@ fn vttest8_0() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -727,6 +772,7 @@ fn vttest8_0() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest8-0"; @@ -745,6 +791,7 @@ fn vttest8_1() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -758,6 +805,7 @@ fn vttest8_1() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest8-1"; @@ -776,6 +824,7 @@ fn vttest8_2() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -789,6 +838,7 @@ fn vttest8_2() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest8-2"; @@ -807,6 +857,7 @@ fn vttest8_3() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -820,6 +871,7 @@ fn vttest8_3() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest8-3"; @@ -838,6 +890,7 @@ fn vttest8_4() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -851,6 +904,7 @@ fn vttest8_4() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest8-4"; @@ -869,6 +923,7 @@ fn vttest8_5() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -882,6 +937,7 @@ fn vttest8_5() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vttest8-5"; @@ -900,6 +956,7 @@ fn csi_b() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -913,6 +970,7 @@ fn csi_b() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "csi-b"; @@ -931,6 +989,7 @@ fn csi_capital_i() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -944,6 +1003,7 @@ fn csi_capital_i() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "csi-capital-i"; @@ -962,6 +1022,7 @@ fn csi_capital_z() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -975,6 +1036,7 @@ fn csi_capital_z() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "csi-capital-z"; @@ -993,6 +1055,7 @@ fn terminal_reports() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -1006,6 +1069,7 @@ fn terminal_reports() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "terminal_reports"; @@ -1024,6 +1088,7 @@ fn wide_characters() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1037,6 +1102,7 @@ fn wide_characters() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide_characters"; @@ -1055,6 +1121,7 @@ fn wide_characters_line_wrap() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1068,6 +1135,7 @@ fn wide_characters_line_wrap() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide_characters_line_wrap"; @@ -1086,6 +1154,7 @@ fn insert_character_in_line_with_wide_character() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1099,6 +1168,7 @@ fn insert_character_in_line_with_wide_character() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide_characters_middle_line_insert"; @@ -1117,6 +1187,7 @@ fn delete_char_in_middle_of_line_with_widechar() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1130,6 +1201,7 @@ fn delete_char_in_middle_of_line_with_widechar() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide-chars-delete-middle"; @@ -1148,6 +1220,7 @@ fn delete_char_in_middle_of_line_with_multiple_widechars() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1161,6 +1234,7 @@ fn delete_char_in_middle_of_line_with_multiple_widechars() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide-chars-delete-middle-after-multi"; @@ -1179,6 +1253,7 @@ fn fish_wide_characters_override_clock() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1192,6 +1267,7 @@ fn fish_wide_characters_override_clock() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "fish_wide_characters_override_clock"; @@ -1210,6 +1286,7 @@ fn bash_delete_wide_characters() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1223,6 +1300,7 @@ fn bash_delete_wide_characters() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "bash_delete_wide_characters"; @@ -1241,6 +1319,7 @@ fn delete_wide_characters_before_cursor() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1254,6 +1333,7 @@ fn delete_wide_characters_before_cursor() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "delete_wide_characters_before_cursor"; @@ -1272,6 +1352,7 @@ fn delete_wide_characters_before_cursor_when_cursor_is_on_wide_character() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1285,6 +1366,7 @@ fn delete_wide_characters_before_cursor_when_cursor_is_on_wide_character() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "delete_wide_characters_before_cursor_when_cursor_is_on_wide_character"; @@ -1303,6 +1385,7 @@ fn delete_wide_character_under_cursor() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1316,6 +1399,7 @@ fn delete_wide_character_under_cursor() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "delete_wide_character_under_cursor"; @@ -1334,6 +1418,7 @@ fn replace_wide_character_under_cursor() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1347,6 +1432,7 @@ fn replace_wide_character_under_cursor() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "replace_wide_character_under_cursor"; @@ -1365,6 +1451,7 @@ fn wrap_wide_characters() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1378,6 +1465,7 @@ fn wrap_wide_characters() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide_characters_full"; @@ -1396,6 +1484,7 @@ fn wrap_wide_characters_on_size_change() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1409,6 +1498,7 @@ fn wrap_wide_characters_on_size_change() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide_characters_full"; @@ -1428,6 +1518,7 @@ fn unwrap_wide_characters_on_size_change() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1441,6 +1532,7 @@ fn unwrap_wide_characters_on_size_change() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide_characters_full"; @@ -1461,6 +1553,7 @@ fn wrap_wide_characters_in_the_middle_of_the_line() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1474,6 +1567,7 @@ fn wrap_wide_characters_in_the_middle_of_the_line() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide_characters_line_middle"; @@ -1492,6 +1586,7 @@ fn wrap_wide_characters_at_the_end_of_the_line() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -1505,6 +1600,7 @@ fn wrap_wide_characters_at_the_end_of_the_line() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "wide_characters_line_end"; @@ -1523,6 +1619,7 @@ fn copy_selected_text_from_viewport() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 27, @@ -1536,6 +1633,7 @@ fn copy_selected_text_from_viewport() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "grid_copy"; @@ -1562,6 +1660,7 @@ fn copy_wrapped_selected_text_from_viewport() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 22, @@ -1575,6 +1674,7 @@ fn copy_wrapped_selected_text_from_viewport() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "grid_copy_wrapped"; @@ -1600,6 +1700,7 @@ fn copy_selected_text_from_lines_above() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 27, @@ -1613,6 +1714,7 @@ fn copy_selected_text_from_lines_above() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "grid_copy"; @@ -1639,6 +1741,7 @@ fn copy_selected_text_from_lines_below() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 27, @@ -1652,6 +1755,7 @@ fn copy_selected_text_from_lines_below() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "grid_copy"; @@ -1686,6 +1790,7 @@ fn run_bandwhich_from_fish_shell() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -1699,6 +1804,7 @@ fn run_bandwhich_from_fish_shell() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "fish_and_bandwhich"; @@ -1717,6 +1823,7 @@ fn fish_tab_completion_options() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -1730,6 +1837,7 @@ fn fish_tab_completion_options() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "fish_tab_completion_options"; @@ -1754,6 +1862,7 @@ pub fn fish_select_tab_completion_options() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -1767,6 +1876,7 @@ pub fn fish_select_tab_completion_options() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "fish_select_tab_completion_options"; @@ -1795,6 +1905,7 @@ pub fn vim_scroll_region_down() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -1808,6 +1919,7 @@ pub fn vim_scroll_region_down() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vim_scroll_region_down"; @@ -1833,6 +1945,7 @@ pub fn vim_ctrl_d() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -1846,6 +1959,7 @@ pub fn vim_ctrl_d() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vim_ctrl_d"; @@ -1870,6 +1984,7 @@ pub fn vim_ctrl_u() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -1883,6 +1998,7 @@ pub fn vim_ctrl_u() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vim_ctrl_u"; @@ -1901,6 +2017,7 @@ pub fn htop() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -1914,6 +2031,7 @@ pub fn htop() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "htop"; @@ -1932,6 +2050,7 @@ pub fn htop_scrolling() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -1945,6 +2064,7 @@ pub fn htop_scrolling() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "htop_scrolling"; @@ -1963,6 +2083,7 @@ pub fn htop_right_scrolling() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -1976,6 +2097,7 @@ pub fn htop_right_scrolling() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "htop_right_scrolling"; @@ -2004,6 +2126,7 @@ pub fn vim_overwrite() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -2017,6 +2140,7 @@ pub fn vim_overwrite() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "vim_overwrite"; @@ -2037,6 +2161,7 @@ pub fn clear_scroll_region() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -2050,6 +2175,7 @@ pub fn clear_scroll_region() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "clear_scroll_region"; @@ -2068,6 +2194,7 @@ pub fn display_tab_characters_properly() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -2081,6 +2208,7 @@ pub fn display_tab_characters_properly() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "tab_characters"; @@ -2099,6 +2227,7 @@ pub fn neovim_insert_mode() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -2112,6 +2241,7 @@ pub fn neovim_insert_mode() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "nvim_insert"; @@ -2130,6 +2260,7 @@ pub fn bash_cursor_linewrap() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -2143,6 +2274,7 @@ pub fn bash_cursor_linewrap() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "bash_cursor_linewrap"; @@ -2163,6 +2295,7 @@ pub fn fish_paste_multiline() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -2176,6 +2309,7 @@ pub fn fish_paste_multiline() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "fish_paste_multiline"; @@ -2194,6 +2328,7 @@ pub fn git_log() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -2207,6 +2342,7 @@ pub fn git_log() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "git_log"; @@ -2227,6 +2363,7 @@ pub fn git_diff_scrollup() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 28, @@ -2240,6 +2377,7 @@ pub fn git_diff_scrollup() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "git_diff_scrollup"; @@ -2258,6 +2396,7 @@ pub fn emacs_longbuf() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 60, @@ -2271,6 +2410,7 @@ pub fn emacs_longbuf() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "emacs_longbuf_tutorial"; @@ -2289,6 +2429,7 @@ pub fn top_and_quit() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 56, @@ -2302,6 +2443,7 @@ pub fn top_and_quit() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "top_and_quit"; @@ -2327,6 +2469,7 @@ pub fn exa_plus_omf_theme() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 56, @@ -2340,6 +2483,7 @@ pub fn exa_plus_omf_theme() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "exa_plus_omf_theme"; @@ -2358,6 +2502,7 @@ pub fn scroll_up() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 10, @@ -2371,6 +2516,7 @@ pub fn scroll_up() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "scrolling"; @@ -2390,6 +2536,7 @@ pub fn scroll_down() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 10, @@ -2403,6 +2550,7 @@ pub fn scroll_down() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "scrolling"; @@ -2423,6 +2571,7 @@ pub fn scroll_up_with_line_wraps() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 10, @@ -2436,6 +2585,7 @@ pub fn scroll_up_with_line_wraps() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "scrolling"; @@ -2455,6 +2605,7 @@ pub fn scroll_down_with_line_wraps() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 10, @@ -2468,6 +2619,7 @@ pub fn scroll_down_with_line_wraps() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "scrolling"; @@ -2488,6 +2640,7 @@ pub fn scroll_up_decrease_width_and_scroll_down() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 10, @@ -2501,6 +2654,7 @@ pub fn scroll_up_decrease_width_and_scroll_down() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "scrolling"; @@ -2526,6 +2680,7 @@ pub fn scroll_up_increase_width_and_scroll_down() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 10, @@ -2539,6 +2694,7 @@ pub fn scroll_up_increase_width_and_scroll_down() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "scrolling"; @@ -2564,6 +2720,7 @@ fn saved_cursor_across_resize() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 4, @@ -2577,6 +2734,7 @@ fn saved_cursor_across_resize() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let mut parse = |s, grid: &mut Grid| { @@ -2611,6 +2769,7 @@ fn saved_cursor_across_resize_longline() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 4, @@ -2624,6 +2783,7 @@ fn saved_cursor_across_resize_longline() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let mut parse = |s, grid: &mut Grid| { @@ -2651,6 +2811,7 @@ fn saved_cursor_across_resize_rewrap() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 4, @@ -2664,6 +2825,7 @@ fn saved_cursor_across_resize_rewrap() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let mut parse = |s, grid: &mut Grid| { @@ -2691,6 +2853,7 @@ pub fn move_cursor_below_scroll_region() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 34, @@ -2704,6 +2867,7 @@ pub fn move_cursor_below_scroll_region() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "move_cursor_below_scroll_region"; @@ -2722,6 +2886,7 @@ pub fn insert_wide_characters_in_existing_line() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 21, @@ -2735,6 +2900,7 @@ pub fn insert_wide_characters_in_existing_line() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "chinese_characters_line_middle"; @@ -2759,6 +2925,7 @@ pub fn full_screen_scroll_region_and_scroll_up() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 54, @@ -2772,6 +2939,7 @@ pub fn full_screen_scroll_region_and_scroll_up() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "scroll_region_full_screen"; @@ -2793,6 +2961,7 @@ pub fn ring_bell() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 134, @@ -2806,6 +2975,7 @@ pub fn ring_bell() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "ring_bell"; @@ -2824,6 +2994,7 @@ pub fn alternate_screen_change_size() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 20, @@ -2837,6 +3008,7 @@ pub fn alternate_screen_change_size() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "alternate_screen_change_size"; @@ -2859,6 +3031,7 @@ pub fn fzf_fullscreen() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -2872,6 +3045,7 @@ pub fn fzf_fullscreen() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "fzf_fullscreen"; @@ -2894,6 +3068,7 @@ pub fn replace_multiple_wide_characters_under_cursor() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -2907,6 +3082,7 @@ pub fn replace_multiple_wide_characters_under_cursor() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "replace_multiple_wide_characters"; @@ -2929,6 +3105,7 @@ pub fn replace_non_wide_characters_with_wide_characters() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -2942,6 +3119,7 @@ pub fn replace_non_wide_characters_with_wide_characters() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "replace_non_wide_characters_with_wide_characters"; @@ -2960,6 +3138,7 @@ pub fn scroll_down_ansi() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -2973,6 +3152,7 @@ pub fn scroll_down_ansi() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "scroll_down"; @@ -2991,6 +3171,7 @@ pub fn ansi_capital_t() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3004,6 +3185,7 @@ pub fn ansi_capital_t() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let content = "foo\u{1b}[14Tbar".as_bytes(); @@ -3021,6 +3203,7 @@ pub fn ansi_capital_s() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3034,6 +3217,7 @@ pub fn ansi_capital_s() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let content = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfoo\u{1b}[14Sbar".as_bytes(); @@ -3051,6 +3235,7 @@ fn terminal_pixel_size_reports() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3064,6 +3249,7 @@ fn terminal_pixel_size_reports() { }))), sixel_image_store, Style::default(), + osc8_hyperlinks, debug, arrow_fonts, styled_underlines, @@ -3091,6 +3277,7 @@ fn terminal_pixel_size_reports_in_unsupported_terminals() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3104,6 +3291,7 @@ fn terminal_pixel_size_reports_in_unsupported_terminals() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "terminal_pixel_size_reports"; @@ -3129,6 +3317,7 @@ pub fn ansi_csi_at_sign() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3142,6 +3331,7 @@ pub fn ansi_csi_at_sign() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let content = "foo\u{1b}[2D\u{1b}[2@".as_bytes(); @@ -3163,6 +3353,7 @@ pub fn sixel_images_are_reaped_when_scrolled_off() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3176,6 +3367,7 @@ pub fn sixel_images_are_reaped_when_scrolled_off() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let pane_content = read_fixture("sixel-image-500px.six"); @@ -3206,6 +3398,7 @@ pub fn sixel_images_are_reaped_when_resetting() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3219,6 +3412,7 @@ pub fn sixel_images_are_reaped_when_resetting() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let pane_content = read_fixture("sixel-image-500px.six"); @@ -3246,6 +3440,7 @@ pub fn sixel_image_in_alternate_buffer() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 30, @@ -3259,6 +3454,7 @@ pub fn sixel_image_in_alternate_buffer() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); @@ -3297,6 +3493,7 @@ pub fn sixel_with_image_scrolling_decsdm() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 30, @@ -3310,6 +3507,7 @@ pub fn sixel_with_image_scrolling_decsdm() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); @@ -3367,6 +3565,7 @@ pub fn osc_4_background_query() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3380,6 +3579,7 @@ pub fn osc_4_background_query() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let content = "\u{1b}]10;?\u{1b}\\"; @@ -3405,6 +3605,7 @@ pub fn osc_4_foreground_query() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3418,6 +3619,7 @@ pub fn osc_4_foreground_query() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let content = "\u{1b}]11;?\u{1b}\\"; @@ -3445,6 +3647,7 @@ pub fn osc_4_color_query() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3458,6 +3661,7 @@ pub fn osc_4_color_query() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let content = "\u{1b}]4;222;?\u{1b}\\"; @@ -3483,6 +3687,7 @@ pub fn xtsmgraphics_color_register_count() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3496,6 +3701,7 @@ pub fn xtsmgraphics_color_register_count() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let content = "\u{1b}[?1;1;S\u{1b}\\"; @@ -3525,6 +3731,7 @@ pub fn xtsmgraphics_pixel_graphics_geometry() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 51, @@ -3538,6 +3745,7 @@ pub fn xtsmgraphics_pixel_graphics_geometry() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let content = "\u{1b}[?2;1;S\u{1b}\\"; @@ -3567,6 +3775,7 @@ pub fn cursor_hide_persists_through_alternate_screen() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 30, @@ -3580,6 +3789,7 @@ pub fn cursor_hide_persists_through_alternate_screen() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); @@ -3623,6 +3833,7 @@ fn table_ui_component() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -3636,6 +3847,7 @@ fn table_ui_component() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "table-ui-component"; @@ -3654,6 +3866,7 @@ fn table_ui_component_with_coordinates() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -3667,6 +3880,7 @@ fn table_ui_component_with_coordinates() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "table-ui-component-with-coordinates"; @@ -3685,6 +3899,7 @@ fn ribbon_ui_component() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -3698,6 +3913,7 @@ fn ribbon_ui_component() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "ribbon-ui-component"; @@ -3716,6 +3932,7 @@ fn ribbon_ui_component_with_coordinates() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -3729,6 +3946,7 @@ fn ribbon_ui_component_with_coordinates() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "ribbon-ui-component-with-coordinates"; @@ -3747,6 +3965,7 @@ fn nested_list_ui_component() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -3760,6 +3979,7 @@ fn nested_list_ui_component() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "nested-list-ui-component"; @@ -3778,6 +3998,7 @@ fn nested_list_ui_component_with_coordinates() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -3791,6 +4012,7 @@ fn nested_list_ui_component_with_coordinates() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "nested-list-ui-component-with-coordinates"; @@ -3809,6 +4031,7 @@ fn text_ui_component() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -3822,6 +4045,7 @@ fn text_ui_component() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "text-ui-component"; @@ -3840,6 +4064,7 @@ fn text_ui_component_with_coordinates() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -3853,6 +4078,7 @@ fn text_ui_component_with_coordinates() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let fixture_name = "text-ui-component-with-coordinates"; @@ -3879,6 +4105,7 @@ fn cannot_escape_scroll_region() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( 41, @@ -3892,6 +4119,7 @@ fn cannot_escape_scroll_region() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let content = "\u{1b}[1;42r\u{1b}[42;1HHi there!".as_bytes(); diff --git a/zellij-server/src/panes/unit/search_in_pane_tests.rs b/zellij-server/src/panes/unit/search_in_pane_tests.rs index aebaa5d73..ad5678bd2 100644 --- a/zellij-server/src/panes/unit/search_in_pane_tests.rs +++ b/zellij-server/src/panes/unit/search_in_pane_tests.rs @@ -31,6 +31,7 @@ fn create_pane() -> TerminalPane { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -48,6 +49,7 @@ fn create_pane() -> TerminalPane { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index diff --git a/zellij-server/src/panes/unit/terminal_pane_tests.rs b/zellij-server/src/panes/unit/terminal_pane_tests.rs index 01515f733..3fecdf5d5 100644 --- a/zellij-server/src/panes/unit/terminal_pane_tests.rs +++ b/zellij-server/src/panes/unit/terminal_pane_tests.rs @@ -39,6 +39,7 @@ pub fn scrolling_inside_a_pane() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -56,6 +57,7 @@ pub fn scrolling_inside_a_pane() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -90,6 +92,7 @@ pub fn sixel_image_inside_terminal_pane() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -107,6 +110,7 @@ pub fn sixel_image_inside_terminal_pane() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -141,6 +145,7 @@ pub fn partial_sixel_image_inside_terminal_pane() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -158,6 +163,7 @@ pub fn partial_sixel_image_inside_terminal_pane() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -186,6 +192,7 @@ pub fn overflowing_sixel_image_inside_terminal_pane() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -203,6 +210,7 @@ pub fn overflowing_sixel_image_inside_terminal_pane() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -230,6 +238,7 @@ pub fn scrolling_through_a_sixel_image() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -247,6 +256,7 @@ pub fn scrolling_through_a_sixel_image() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -285,6 +295,7 @@ pub fn multiple_sixel_images_in_pane() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -302,6 +313,7 @@ pub fn multiple_sixel_images_in_pane() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -338,6 +350,7 @@ pub fn resizing_pane_with_sixel_images() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -355,6 +368,7 @@ pub fn resizing_pane_with_sixel_images() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -394,6 +408,7 @@ pub fn changing_character_cell_size_with_sixel_images() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -411,6 +426,7 @@ pub fn changing_character_cell_size_with_sixel_images() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -455,6 +471,7 @@ pub fn keep_working_after_corrupted_sixel_image() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -472,6 +489,7 @@ pub fn keep_working_after_corrupted_sixel_image() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -514,6 +532,7 @@ pub fn pane_with_frame_position_is_on_frame() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -531,6 +550,7 @@ pub fn pane_with_frame_position_is_on_frame() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -609,6 +629,7 @@ pub fn pane_with_bottom_and_right_borders_position_is_on_frame() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -626,6 +647,7 @@ pub fn pane_with_bottom_and_right_borders_position_is_on_frame() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index @@ -704,6 +726,7 @@ pub fn frameless_pane_position_is_on_frame() { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut terminal_pane = TerminalPane::new( pid, @@ -721,6 +744,7 @@ pub fn frameless_pane_position_is_on_frame() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); // 0 is the pane index diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs index 63404cbf5..21732e9ef 100644 --- a/zellij-server/src/screen.rs +++ b/zellij-server/src/screen.rs @@ -922,6 +922,7 @@ pub(crate) struct Screen { default_layout: Box, default_shell: PathBuf, styled_underlines: bool, + osc8_hyperlinks: bool, arrow_fonts: bool, layout_dir: Option, default_layout_name: Option, @@ -960,6 +961,7 @@ impl Screen { serialize_pane_viewport: bool, scrollback_lines_to_serialize: Option, styled_underlines: bool, + osc8_hyperlinks: bool, arrow_fonts: bool, layout_dir: Option, explicitly_disable_kitty_keyboard_protocol: bool, @@ -1009,6 +1011,7 @@ impl Screen { serialize_pane_viewport, scrollback_lines_to_serialize, styled_underlines, + osc8_hyperlinks, arrow_fonts, resurrectable_sessions, layout_dir, @@ -1516,6 +1519,7 @@ impl Screen { self.sixel_image_store.clone(), self.character_cell_size.clone(), self.styled_underlines, + self.osc8_hyperlinks, ); let mut tabs_to_close = vec![]; @@ -1561,6 +1565,7 @@ impl Screen { self.sixel_image_store.clone(), self.character_cell_size.clone(), self.styled_underlines, + self.osc8_hyperlinks, ); let focused_tab_index_of_followed_client_id = *self @@ -1749,6 +1754,7 @@ impl Screen { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, self.default_editor.clone(), self.web_clients_allowed, @@ -3713,6 +3719,7 @@ pub(crate) fn screen_thread_main( .unwrap_or_else(|| IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1))); let web_server_port = config_options.web_server_port.unwrap_or(8082); let styled_underlines = config_options.styled_underlines.unwrap_or(true); + let osc8_hyperlinks = config_options.osc8_hyperlinks.unwrap_or(true); let explicitly_disable_kitty_keyboard_protocol = config_options .support_kitty_keyboard_protocol .map(|e| !e) // this is due to the config options wording, if @@ -3755,6 +3762,7 @@ pub(crate) fn screen_thread_main( serialize_pane_viewport, scrollback_lines_to_serialize, styled_underlines, + osc8_hyperlinks, arrow_fonts, layout_dir, explicitly_disable_kitty_keyboard_protocol, diff --git a/zellij-server/src/tab/layout_applier.rs b/zellij-server/src/tab/layout_applier.rs index 40eb4a119..16fecdbba 100644 --- a/zellij-server/src/tab/layout_applier.rs +++ b/zellij-server/src/tab/layout_applier.rs @@ -41,6 +41,7 @@ pub struct LayoutApplier<'a> { debug: bool, arrow_fonts: bool, styled_underlines: bool, + osc8_hyperlinks: bool, explicitly_disable_kitty_keyboard_protocol: bool, blocking_terminal: Option<(u32, NotificationEnd)>, } @@ -65,6 +66,7 @@ impl<'a> LayoutApplier<'a> { debug: bool, arrow_fonts: bool, styled_underlines: bool, + osc8_hyperlinks: bool, explicitly_disable_kitty_keyboard_protocol: bool, blocking_terminal: Option<(u32, NotificationEnd)>, ) -> Self { @@ -98,6 +100,7 @@ impl<'a> LayoutApplier<'a> { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, blocking_terminal, } @@ -637,6 +640,7 @@ impl<'a> LayoutApplier<'a> { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, None, ); @@ -706,6 +710,7 @@ impl<'a> LayoutApplier<'a> { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, notification_end, ); diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs index fac0494fd..ab794853f 100644 --- a/zellij-server/src/tab/mod.rs +++ b/zellij-server/src/tab/mod.rs @@ -263,6 +263,7 @@ pub(crate) struct Tab { debug: bool, arrow_fonts: bool, styled_underlines: bool, + osc8_hyperlinks: bool, explicitly_disable_kitty_keyboard_protocol: bool, web_clients_allowed: bool, web_sharing: WebSharing, @@ -684,6 +685,7 @@ impl Tab { debug: bool, arrow_fonts: bool, styled_underlines: bool, + osc8_hyperlinks: bool, explicitly_disable_kitty_keyboard_protocol: bool, default_editor: Option, web_clients_allowed: bool, @@ -785,6 +787,7 @@ impl Tab { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, default_editor, web_clients_allowed, @@ -830,6 +833,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, blocking_terminal, ) @@ -907,6 +911,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, blocking_terminal, ) @@ -999,6 +1004,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, None, ) @@ -1038,6 +1044,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, None, ) @@ -1513,6 +1520,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, blocking_notification, )) as Box @@ -1625,6 +1633,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, blocking_notification, )) as Box @@ -1726,6 +1735,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, blocking_notification, )) as Box @@ -1871,6 +1881,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, blocking_notification, )) as Box @@ -2085,6 +2096,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, completion_tx, ); @@ -2283,6 +2295,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, completion_tx, ); @@ -2349,6 +2362,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, completion_tx, ); @@ -5909,6 +5923,7 @@ impl Tab { self.debug, self.arrow_fonts, self.styled_underlines, + self.osc8_hyperlinks, self.explicitly_disable_kitty_keyboard_protocol, None, ); diff --git a/zellij-server/src/tab/unit/layout_applier_tests.rs b/zellij-server/src/tab/unit/layout_applier_tests.rs index 4ccf6f226..698307cff 100644 --- a/zellij-server/src/tab/unit/layout_applier_tests.rs +++ b/zellij-server/src/tab/unit/layout_applier_tests.rs @@ -158,6 +158,7 @@ fn create_layout_applier_fixtures( bool, bool, bool, + bool, ) { let viewport = Rc::new(RefCell::new(Viewport { x: 0, @@ -228,6 +229,7 @@ fn create_layout_applier_fixtures( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; ( @@ -249,6 +251,7 @@ fn create_layout_applier_fixtures( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) } @@ -277,6 +280,7 @@ fn create_layout_applier_fixtures_with_receivers( bool, bool, bool, + bool, Receiver<(PtyInstruction, zellij_utils::errors::ErrorContext)>, Receiver<(PluginInstruction, zellij_utils::errors::ErrorContext)>, ) { @@ -355,6 +359,7 @@ fn create_layout_applier_fixtures_with_receivers( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; ( @@ -376,6 +381,7 @@ fn create_layout_applier_fixtures_with_receivers( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, mock_pty_receiver, mock_plugin_receiver, @@ -577,6 +583,7 @@ fn test_apply_empty_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -599,6 +606,7 @@ fn test_apply_empty_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, // blocking_terminal ); @@ -660,6 +668,7 @@ fn test_apply_simple_two_pane_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -682,6 +691,7 @@ fn test_apply_simple_two_pane_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -744,6 +754,7 @@ fn test_apply_three_pane_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -766,6 +777,7 @@ fn test_apply_three_pane_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -827,6 +839,7 @@ fn test_apply_horizontal_split_with_sizes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -849,6 +862,7 @@ fn test_apply_horizontal_split_with_sizes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -910,6 +924,7 @@ fn test_apply_vertical_split_with_sizes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -932,6 +947,7 @@ fn test_apply_vertical_split_with_sizes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -996,6 +1012,7 @@ fn test_apply_nested_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1018,6 +1035,7 @@ fn test_apply_nested_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1078,6 +1096,7 @@ fn test_apply_layout_with_focus() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1100,6 +1119,7 @@ fn test_apply_layout_with_focus() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1163,6 +1183,7 @@ fn test_apply_layout_with_commands() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1185,6 +1206,7 @@ fn test_apply_layout_with_commands() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1245,6 +1267,7 @@ fn test_apply_layout_with_named_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1267,6 +1290,7 @@ fn test_apply_layout_with_named_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1327,6 +1351,7 @@ fn test_apply_layout_with_borderless_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1349,6 +1374,7 @@ fn test_apply_layout_with_borderless_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1418,6 +1444,7 @@ fn test_apply_layout_with_floating_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1440,6 +1467,7 @@ fn test_apply_layout_with_floating_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1510,6 +1538,7 @@ fn test_apply_layout_with_floating_pane_with_command() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1532,6 +1561,7 @@ fn test_apply_layout_with_floating_pane_with_command() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1616,6 +1646,7 @@ fn test_apply_layout_with_mixed_tiled_and_floating_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1638,6 +1669,7 @@ fn test_apply_layout_with_mixed_tiled_and_floating_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1705,6 +1737,7 @@ fn test_reapply_layout_exact_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1727,6 +1760,7 @@ fn test_reapply_layout_exact_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1806,6 +1840,7 @@ fn test_reapply_layout_logical_position_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1828,6 +1863,7 @@ fn test_reapply_layout_logical_position_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -1908,6 +1944,7 @@ fn test_reapply_layout_with_more_positions() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -1930,6 +1967,7 @@ fn test_reapply_layout_with_more_positions() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2015,6 +2053,7 @@ fn test_reapply_floating_pane_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -2037,6 +2076,7 @@ fn test_reapply_floating_pane_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2126,6 +2166,7 @@ fn test_apply_complex_nested_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -2148,6 +2189,7 @@ fn test_apply_complex_nested_layout() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2213,6 +2255,7 @@ fn test_apply_layout_with_stacked_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -2235,6 +2278,7 @@ fn test_apply_layout_with_stacked_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2306,6 +2350,7 @@ fn test_apply_layout_with_multiple_stacks() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -2328,6 +2373,7 @@ fn test_apply_layout_with_multiple_stacks() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2406,6 +2452,7 @@ fn test_apply_layout_with_plugin_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -2428,6 +2475,7 @@ fn test_apply_layout_with_plugin_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2512,6 +2560,7 @@ fn test_apply_layout_with_mixed_plugin_and_terminal_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -2534,6 +2583,7 @@ fn test_apply_layout_with_mixed_plugin_and_terminal_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2601,6 +2651,7 @@ fn test_apply_layout_with_missing_plugin_ids() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -2623,6 +2674,7 @@ fn test_apply_layout_with_missing_plugin_ids() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2676,6 +2728,7 @@ fn test_apply_layout_with_excess_terminal_ids() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -2698,6 +2751,7 @@ fn test_apply_layout_with_excess_terminal_ids() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2771,6 +2825,7 @@ fn test_override_layout_basic_with_both_tiled_and_floating() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -2795,6 +2850,7 @@ fn test_override_layout_basic_with_both_tiled_and_floating() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -2913,6 +2969,7 @@ fn test_override_layout_hide_floating_panes_true() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -2937,6 +2994,7 @@ fn test_override_layout_hide_floating_panes_true() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -3043,6 +3101,7 @@ fn test_override_layout_show_floating_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -3067,6 +3126,7 @@ fn test_override_layout_show_floating_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -3179,6 +3239,7 @@ fn test_override_tiled_exact_match_preservation_commands() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -3203,6 +3264,7 @@ fn test_override_tiled_exact_match_preservation_commands() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -3304,6 +3366,7 @@ fn test_override_tiled_exact_match_preservation_plugins() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -3328,6 +3391,7 @@ fn test_override_tiled_exact_match_preservation_plugins() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -3427,6 +3491,7 @@ fn test_override_tiled_all_panes_closed_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -3451,6 +3516,7 @@ fn test_override_tiled_all_panes_closed_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -3555,6 +3621,7 @@ fn test_override_tiled_mixed_some_matches_some_new() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -3579,6 +3646,7 @@ fn test_override_tiled_mixed_some_matches_some_new() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -3674,6 +3742,7 @@ fn test_override_tiled_new_panes_for_unmatched_positions() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -3696,6 +3765,7 @@ fn test_override_tiled_new_panes_for_unmatched_positions() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -3783,6 +3853,7 @@ fn test_override_tiled_focus_on_new_pane() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -3805,6 +3876,7 @@ fn test_override_tiled_focus_on_new_pane() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -3892,6 +3964,7 @@ fn test_override_tiled_focus_when_focused_pane_closed() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -3916,6 +3989,7 @@ fn test_override_tiled_focus_when_focused_pane_closed() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -4016,6 +4090,7 @@ fn test_override_tiled_empty_layout_closes_all() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -4040,6 +4115,7 @@ fn test_override_tiled_empty_layout_closes_all() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -4153,6 +4229,7 @@ fn test_override_floating_exact_match_preservation() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -4177,6 +4254,7 @@ fn test_override_floating_exact_match_preservation() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -4294,6 +4372,7 @@ fn test_override_floating_all_closed_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -4318,6 +4397,7 @@ fn test_override_floating_all_closed_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -4437,6 +4517,7 @@ fn test_override_floating_new_panes_created() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -4459,6 +4540,7 @@ fn test_override_floating_new_panes_created() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -4579,6 +4661,7 @@ fn test_override_floating_focus_handling() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -4603,6 +4686,7 @@ fn test_override_floating_focus_handling() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -4712,6 +4796,7 @@ fn test_override_floating_position_and_size_update() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -4734,6 +4819,7 @@ fn test_override_floating_position_and_size_update() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -4823,6 +4909,7 @@ fn test_override_floating_return_value_has_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ) = create_layout_applier_fixtures(size); @@ -4845,6 +4932,7 @@ fn test_override_floating_return_value_has_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -4944,6 +5032,7 @@ fn test_override_floating_return_value_no_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -4968,6 +5057,7 @@ fn test_override_floating_return_value_no_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -5083,6 +5173,7 @@ fn test_override_full_tiled_and_floating_together() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -5107,6 +5198,7 @@ fn test_override_full_tiled_and_floating_together() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -5227,6 +5319,7 @@ fn test_override_viewport_adjustment_with_borderless() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -5251,6 +5344,7 @@ fn test_override_viewport_adjustment_with_borderless() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -5349,6 +5443,7 @@ fn test_override_tiled_retain_terminal_panes_partial_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -5373,6 +5468,7 @@ fn test_override_tiled_retain_terminal_panes_partial_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -5480,6 +5576,7 @@ fn test_override_tiled_retain_terminal_panes_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -5504,6 +5601,7 @@ fn test_override_tiled_retain_terminal_panes_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -5626,6 +5724,7 @@ fn test_override_floating_retain_terminal_panes_partial_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -5650,6 +5749,7 @@ fn test_override_floating_retain_terminal_panes_partial_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -5782,6 +5882,7 @@ fn test_override_floating_retain_terminal_panes_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -5806,6 +5907,7 @@ fn test_override_floating_retain_terminal_panes_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -5944,6 +6046,7 @@ fn test_override_mixed_retain_terminal_panes_both_tiled_and_floating() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -5968,6 +6071,7 @@ fn test_override_mixed_retain_terminal_panes_both_tiled_and_floating() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -6103,6 +6207,7 @@ fn test_override_retain_terminal_but_close_plugin_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -6127,6 +6232,7 @@ fn test_override_retain_terminal_but_close_plugin_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -6259,6 +6365,7 @@ fn test_override_tiled_retain_plugin_panes_partial_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -6283,6 +6390,7 @@ fn test_override_tiled_retain_plugin_panes_partial_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -6396,6 +6504,7 @@ fn test_override_tiled_retain_plugin_panes_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -6420,6 +6529,7 @@ fn test_override_tiled_retain_plugin_panes_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -6548,6 +6658,7 @@ fn test_override_floating_retain_plugin_panes_partial_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -6572,6 +6683,7 @@ fn test_override_floating_retain_plugin_panes_partial_match() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -6695,6 +6807,7 @@ fn test_override_floating_retain_plugin_panes_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -6719,6 +6832,7 @@ fn test_override_floating_retain_plugin_panes_no_matches() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -6850,6 +6964,7 @@ fn test_override_mixed_retain_plugin_panes_both_tiled_and_floating() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -6874,6 +6989,7 @@ fn test_override_mixed_retain_plugin_panes_both_tiled_and_floating() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); @@ -7005,6 +7121,7 @@ fn test_override_retain_plugin_but_close_terminal_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, pty_receiver, plugin_receiver, @@ -7029,6 +7146,7 @@ fn test_override_retain_plugin_but_close_terminal_panes() { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, ); diff --git a/zellij-server/src/tab/unit/tab_integration_tests.rs b/zellij-server/src/tab/unit/tab_integration_tests.rs index 54b80f719..627af6af8 100644 --- a/zellij-server/src/tab/unit/tab_integration_tests.rs +++ b/zellij-server/src/tab/unit/tab_integration_tests.rs @@ -235,6 +235,7 @@ fn create_new_tab(size: Size, default_mode: ModeInfo) -> Tab { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -266,6 +267,7 @@ fn create_new_tab(size: Size, default_mode: ModeInfo) -> Tab { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, @@ -317,6 +319,7 @@ fn create_new_tab_without_pane_frames(size: Size, default_mode: ModeInfo) -> Tab let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -348,6 +351,7 @@ fn create_new_tab_without_pane_frames(size: Size, default_mode: ModeInfo) -> Tab debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, @@ -414,6 +418,7 @@ fn create_new_tab_with_swap_layouts( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -445,6 +450,7 @@ fn create_new_tab_with_swap_layouts( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, @@ -512,6 +518,7 @@ fn create_new_tab_with_os_api( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -543,6 +550,7 @@ fn create_new_tab_with_os_api( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, @@ -596,6 +604,7 @@ fn create_new_tab_with_layout(size: Size, default_mode: ModeInfo, layout: &str) let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -627,6 +636,7 @@ fn create_new_tab_with_layout(size: Size, default_mode: ModeInfo, layout: &str) debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, @@ -694,6 +704,7 @@ fn create_new_tab_with_mock_pty_writer( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -725,6 +736,7 @@ fn create_new_tab_with_mock_pty_writer( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, @@ -783,6 +795,7 @@ fn create_new_tab_with_sixel_support( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -814,6 +827,7 @@ fn create_new_tab_with_sixel_support( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, @@ -862,6 +876,7 @@ fn take_snapshot(ansi_instructions: &str, rows: usize, columns: usize, palette: let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( rows, @@ -875,6 +890,7 @@ fn take_snapshot(ansi_instructions: &str, rows: usize, columns: usize, palette: debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let mut vte_parser = vte::Parser::new(); @@ -899,6 +915,7 @@ fn take_snapshot_with_sixel( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( rows, @@ -912,6 +929,7 @@ fn take_snapshot_with_sixel( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let mut vte_parser = vte::Parser::new(); @@ -933,6 +951,7 @@ fn take_snapshot_and_cursor_position( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( rows, @@ -946,6 +965,7 @@ fn take_snapshot_and_cursor_position( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let mut vte_parser = vte::Parser::new(); @@ -3358,7 +3378,7 @@ fn move_floating_pane_with_sixel_image() { width: 8, height: 21, }))); - let mut output = Output::new(sixel_image_store.clone(), character_cell_size, true); + let mut output = Output::new(sixel_image_store.clone(), character_cell_size, true, true); tab.toggle_floating_panes(Some(client_id), None, None) .unwrap(); @@ -3412,7 +3432,7 @@ fn floating_pane_above_sixel_image() { width: 8, height: 21, }))); - let mut output = Output::new(sixel_image_store.clone(), character_cell_size, true); + let mut output = Output::new(sixel_image_store.clone(), character_cell_size, true, true); tab.toggle_floating_panes(Some(client_id), None, None) .unwrap(); diff --git a/zellij-server/src/tab/unit/tab_tests.rs b/zellij-server/src/tab/unit/tab_tests.rs index 3adbf43bd..fec63764a 100644 --- a/zellij-server/src/tab/unit/tab_tests.rs +++ b/zellij-server/src/tab/unit/tab_tests.rs @@ -175,6 +175,7 @@ fn create_new_tab(size: Size, stacked_resize: bool) -> Tab { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -206,6 +207,7 @@ fn create_new_tab(size: Size, stacked_resize: bool) -> Tab { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, @@ -256,6 +258,7 @@ fn create_new_tab_with_layout(size: Size, layout: TiledPaneLayout) -> Tab { let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -287,6 +290,7 @@ fn create_new_tab_with_layout(size: Size, layout: TiledPaneLayout) -> Tab { debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, @@ -343,6 +347,7 @@ fn create_new_tab_with_cell_size( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let advanced_mouse_actions = true; let web_sharing = WebSharing::Off; @@ -374,6 +379,7 @@ fn create_new_tab_with_cell_size( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, None, false, diff --git a/zellij-server/src/unit/screen_tests.rs b/zellij-server/src/unit/screen_tests.rs index 010da1865..9bad6c927 100644 --- a/zellij-server/src/unit/screen_tests.rs +++ b/zellij-server/src/unit/screen_tests.rs @@ -79,6 +79,7 @@ fn take_snapshots_and_cursor_coordinates_from_render_events<'a>( let debug = false; let arrow_fonts = true; let styled_underlines = true; + let osc8_hyperlinks = true; let explicitly_disable_kitty_keyboard_protocol = false; let mut grid = Grid::new( screen_size.rows, @@ -92,6 +93,7 @@ fn take_snapshots_and_cursor_coordinates_from_render_events<'a>( debug, arrow_fonts, styled_underlines, + osc8_hyperlinks, explicitly_disable_kitty_keyboard_protocol, ); let snapshots: Vec<(Option<(usize, usize)>, String)> = all_events @@ -279,6 +281,7 @@ fn create_new_screen(size: Size, advanced_mouse_actions: bool) -> Screen { let debug = false; let styled_underlines = true; + let osc8_hyperlinks = true; let arrow_fonts = true; let explicitly_disable_kitty_keyboard_protocol = false; let stacked_resize = true; @@ -302,6 +305,7 @@ fn create_new_screen(size: Size, advanced_mouse_actions: bool) -> Screen { serialize_pane_viewport, scrollback_lines_to_serialize, styled_underlines, + osc8_hyperlinks, arrow_fonts, layout_dir, explicitly_disable_kitty_keyboard_protocol, diff --git a/zellij-utils/assets/config/default.kdl b/zellij-utils/assets/config/default.kdl index db2e4468c..ee7b09a48 100644 --- a/zellij-utils/assets/config/default.kdl +++ b/zellij-utils/assets/config/default.kdl @@ -520,6 +520,11 @@ load_plugins { // // advanced_mouse_actions false +// Whether to output OSC8 hyperlink sequences +// Default: true +// +// osc8_hyperlinks false + // A command to run (will be wrapped with sh -c and provided the RESURRECT_COMMAND env variable) // after Zellij attempts to discover a command inside a pane when resurrecting sessions, the STDOUT // of this command will be used instead of the discovered RESURRECT_COMMAND diff --git a/zellij-utils/assets/prost_ipc/client_server_contract.rs b/zellij-utils/assets/prost_ipc/client_server_contract.rs index ccfe26100..a5dc31bd8 100644 --- a/zellij-utils/assets/prost_ipc/client_server_contract.rs +++ b/zellij-utils/assets/prost_ipc/client_server_contract.rs @@ -1661,6 +1661,8 @@ pub struct Options { pub enforce_https_for_localhost: ::core::option::Option, #[prost(string, optional, tag="39")] pub post_command_discovery_hook: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bool, optional, tag="40")] + pub osc8_hyperlinks: ::core::option::Option, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] diff --git a/zellij-utils/src/client_server_contract/common_types.proto b/zellij-utils/src/client_server_contract/common_types.proto index 1be7c4c9b..ce66881a0 100644 --- a/zellij-utils/src/client_server_contract/common_types.proto +++ b/zellij-utils/src/client_server_contract/common_types.proto @@ -1023,6 +1023,7 @@ message Options { optional string web_server_key = 37; optional bool enforce_https_for_localhost = 38; optional string post_command_discovery_hook = 39; + optional bool osc8_hyperlinks = 40; } enum OnForceClose { diff --git a/zellij-utils/src/input/options.rs b/zellij-utils/src/input/options.rs index e9035dc15..6def4a88c 100644 --- a/zellij-utils/src/input/options.rs +++ b/zellij-utils/src/input/options.rs @@ -108,6 +108,11 @@ pub struct Options { #[serde(default)] pub copy_on_select: Option, + /// Enable OSC8 hyperlink output (true or false) + #[clap(long, value_parser)] + #[serde(default)] + pub osc8_hyperlinks: Option, + /// Explicit full path to open the scrollback editor (default is $EDITOR or $VISUAL) #[clap(long, value_parser)] pub scrollback_editor: Option, @@ -287,6 +292,7 @@ impl Options { let copy_command = other.copy_command.or_else(|| self.copy_command.clone()); let copy_clipboard = other.copy_clipboard.or(self.copy_clipboard); let copy_on_select = other.copy_on_select.or(self.copy_on_select); + let osc8_hyperlinks = other.osc8_hyperlinks.or(self.osc8_hyperlinks); let scrollback_editor = other .scrollback_editor .or_else(|| self.scrollback_editor.clone()); @@ -345,6 +351,7 @@ impl Options { copy_command, copy_clipboard, copy_on_select, + osc8_hyperlinks, scrollback_editor, session_name, attach_to_session, @@ -408,6 +415,7 @@ impl Options { let copy_command = other.copy_command.or_else(|| self.copy_command.clone()); let copy_clipboard = other.copy_clipboard.or(self.copy_clipboard); let copy_on_select = other.copy_on_select.or(self.copy_on_select); + let osc8_hyperlinks = other.osc8_hyperlinks.or(self.osc8_hyperlinks); let scrollback_editor = other .scrollback_editor .or_else(|| self.scrollback_editor.clone()); @@ -462,6 +470,7 @@ impl Options { copy_command, copy_clipboard, copy_on_select, + osc8_hyperlinks, scrollback_editor, session_name, attach_to_session, diff --git a/zellij-utils/src/ipc/protobuf_conversion.rs b/zellij-utils/src/ipc/protobuf_conversion.rs index 5d06cbe59..7810d4ef3 100644 --- a/zellij-utils/src/ipc/protobuf_conversion.rs +++ b/zellij-utils/src/ipc/protobuf_conversion.rs @@ -579,6 +579,7 @@ impl From crate::input::options::Clipboard::Primary => ProtoClipboard::Primary as i32, }), copy_on_select: options.copy_on_select, + osc8_hyperlinks: options.osc8_hyperlinks, scrollback_editor: options .scrollback_editor .map(|p| p.to_string_lossy().to_string()), @@ -664,6 +665,7 @@ impl TryFrom }) .transpose()?, copy_on_select: options.copy_on_select, + osc8_hyperlinks: options.osc8_hyperlinks, scrollback_editor: options.scrollback_editor.map(std::path::PathBuf::from), session_name: options.session_name, attach_to_session: options.attach_to_session, diff --git a/zellij-utils/src/ipc/tests/roundtrip_tests.rs b/zellij-utils/src/ipc/tests/roundtrip_tests.rs index 1c928e6b9..5e2e000a4 100644 --- a/zellij-utils/src/ipc/tests/roundtrip_tests.rs +++ b/zellij-utils/src/ipc/tests/roundtrip_tests.rs @@ -447,6 +447,7 @@ fn test_client_messages() { copy_command: Some("copy_command".to_owned()), copy_clipboard: Some(Clipboard::System), copy_on_select: Some(true), + osc8_hyperlinks: Some(true), scrollback_editor: Some(PathBuf::from("scrollback_editor")), session_name: Some("session_name".to_owned()), attach_to_session: Some(true), diff --git a/zellij-utils/src/kdl/mod.rs b/zellij-utils/src/kdl/mod.rs index 3567145d5..0780aa2a8 100644 --- a/zellij-utils/src/kdl/mod.rs +++ b/zellij-utils/src/kdl/mod.rs @@ -2616,6 +2616,9 @@ impl Options { }; let copy_on_select = kdl_property_first_arg_as_bool_or_error!(kdl_options, "copy_on_select").map(|(v, _)| v); + let osc8_hyperlinks = + kdl_property_first_arg_as_bool_or_error!(kdl_options, "osc8_hyperlinks") + .map(|(v, _)| v); let scrollback_editor = kdl_property_first_arg_as_string_or_error!(kdl_options, "scrollback_editor") .map(|(string, _entry)| PathBuf::from(string)); @@ -2715,6 +2718,7 @@ impl Options { copy_command, copy_clipboard, copy_on_select, + osc8_hyperlinks, scrollback_editor, session_name, attach_to_session, @@ -2774,6 +2778,36 @@ impl Options { None } } + fn osc8_hyperlinks_to_kdl(&self, add_comments: bool) -> Option { + let comment_text = format!( + "{}\n{}\n{}\n{}\n{}\n{}", + " ", + "// Enable OSC8 hyperlink output", + "// Options:", + "// - true (Default)", + "// - false", + "// ", + ); + + let create_node = |node_value: bool| -> KdlNode { + let mut node = KdlNode::new("osc8_hyperlinks"); + node.push(KdlValue::Bool(node_value)); + node + }; + if let Some(osc8_hyperlinks) = self.osc8_hyperlinks { + let mut node = create_node(osc8_hyperlinks); + if add_comments { + node.set_leading(format!("{}\n", comment_text)); + } + Some(node) + } else if add_comments { + let mut node = create_node(true); + node.set_leading(format!("{}\n// ", comment_text)); + Some(node) + } else { + None + } + } fn theme_to_kdl(&self, add_comments: bool) -> Option { let comment_text = format!( "{}\n{}\n{}\n{}", @@ -3896,6 +3930,9 @@ impl Options { if let Some(simplified_ui_node) = self.simplified_ui_to_kdl(add_comments) { nodes.push(simplified_ui_node); } + if let Some(osc8_hyperlinks_node) = self.osc8_hyperlinks_to_kdl(add_comments) { + nodes.push(osc8_hyperlinks_node); + } if let Some(theme_node) = self.theme_to_kdl(add_comments) { nodes.push(theme_node); } @@ -6822,3 +6859,23 @@ fn bare_config_from_default_assets_to_string_with_comments() { ); insta::assert_snapshot!(fake_config_stringified); } + +#[test] +fn osc8_hyperlinks_config_parsing() { + let config_with_osc8_disabled = r#" + osc8_hyperlinks false + "#; + let config = Config::from_kdl(config_with_osc8_disabled, None).unwrap(); + assert_eq!(config.options.osc8_hyperlinks, Some(false)); + + let config_with_osc8_enabled = r#" + osc8_hyperlinks true + "#; + let config = Config::from_kdl(config_with_osc8_enabled, None).unwrap(); + assert_eq!(config.options.osc8_hyperlinks, Some(true)); + + // Test serialization roundtrip + let serialized = config.to_string(false); + let deserialized = Config::from_kdl(&serialized, None).unwrap(); + assert_eq!(deserialized.options.osc8_hyperlinks, Some(true)); +} diff --git a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap index c9d936540..6767921f0 100644 --- a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap +++ b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__bare_config_from_default_assets_to_string_with_comments.snap @@ -297,6 +297,13 @@ web_client { // // simplified_ui true +// Enable OSC8 hyperlink output +// Options: +// - true (Default) +// - false +// +// osc8_hyperlinks true + // Choose the theme that is specified in the themes section. // Default: default // diff --git a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__config_options_to_string_with_comments.snap b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__config_options_to_string_with_comments.snap index 468a97dd3..2a6a6a9f7 100644 --- a/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__config_options_to_string_with_comments.snap +++ b/zellij-utils/src/kdl/snapshots/zellij_utils__kdl__config_options_to_string_with_comments.snap @@ -10,6 +10,13 @@ expression: fake_document.to_string() // simplified_ui true +// Enable OSC8 hyperlink output +// Options: +// - true (Default) +// - false +// +// osc8_hyperlinks true + // Choose the theme that is specified in the themes section. // Default: default // diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_config_options.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_config_options.snap index 61969ae29..90e16136c 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_config_options.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_config_options.snap @@ -21,6 +21,7 @@ Options { copy_command: None, copy_clipboard: None, copy_on_select: None, + osc8_hyperlinks: None, scrollback_editor: None, session_name: None, attach_to_session: None, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options.snap index 5d88e791f..1a977a044 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options.snap @@ -21,6 +21,7 @@ Options { copy_command: None, copy_clipboard: None, copy_on_select: None, + osc8_hyperlinks: None, scrollback_editor: None, session_name: None, attach_to_session: None, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-3.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-3.snap index e0acdc932..15447ff41 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-3.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-3.snap @@ -19,6 +19,7 @@ Options { copy_command: None, copy_clipboard: None, copy_on_select: None, + osc8_hyperlinks: None, scrollback_editor: None, session_name: None, attach_to_session: None, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap index 80f17bd64..437a0c561 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments.snap @@ -6012,6 +6012,7 @@ Config { copy_command: None, copy_clipboard: None, copy_on_select: None, + osc8_hyperlinks: None, scrollback_editor: None, session_name: None, attach_to_session: None, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap index e1e6b5e28..be893c705 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_env_vars_override_config_env_vars.snap @@ -6012,6 +6012,7 @@ Config { copy_command: None, copy_clipboard: None, copy_on_select: None, + osc8_hyperlinks: None, scrollback_editor: None, session_name: None, attach_to_session: None, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap index 2ff6c9157..94b90bde8 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_keybinds_override_config_keybinds.snap @@ -106,6 +106,7 @@ Config { copy_command: None, copy_clipboard: None, copy_on_select: None, + osc8_hyperlinks: None, scrollback_editor: None, session_name: None, attach_to_session: None, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options.snap index aa0fe7638..ca0ddf5c0 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options.snap @@ -21,6 +21,7 @@ Options { copy_command: None, copy_clipboard: None, copy_on_select: None, + osc8_hyperlinks: None, scrollback_editor: None, session_name: None, attach_to_session: None, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap index c9d4c32a5..7fc5882a0 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_themes_override_config_themes.snap @@ -6012,6 +6012,7 @@ Config { copy_command: None, copy_clipboard: None, copy_on_select: None, + osc8_hyperlinks: None, scrollback_editor: None, session_name: None, attach_to_session: None, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap index 98ebf1bb4..48a25d83d 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_ui_config_overrides_config_ui_config.snap @@ -6012,6 +6012,7 @@ Config { copy_command: None, copy_clipboard: None, copy_on_select: None, + osc8_hyperlinks: None, scrollback_editor: None, session_name: None, attach_to_session: None,