mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-26 10:55:12 +03:00
fix: styled underlines in editors (#2918)
* Add styled_underlines param to TerminalPane * Add styled_underlines to Cursor::new * Remove styled_underlines from render_first_run_banner
This commit is contained in:
parent
b20715b5ae
commit
3ebaba9e9e
@ -236,6 +236,7 @@ fn read_from_channel(
|
||||
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_output = TerminalPane::new(
|
||||
0,
|
||||
pane_geom,
|
||||
@ -251,6 +252,7 @@ fn read_from_channel(
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
loop {
|
||||
if !should_keep_running.load(Ordering::SeqCst) {
|
||||
|
@ -374,6 +374,7 @@ pub struct Grid {
|
||||
style: Style,
|
||||
debug: bool,
|
||||
arrow_fonts: bool,
|
||||
styled_underlines: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@ -464,6 +465,7 @@ impl Grid {
|
||||
style: Style, // TODO: consolidate this with terminal_emulator_colors
|
||||
debug: bool,
|
||||
arrow_fonts: bool,
|
||||
styled_underlines: bool,
|
||||
) -> Self {
|
||||
let sixel_grid = SixelGrid::new(character_cell_size.clone(), sixel_image_store);
|
||||
// make sure this is initialized as it is used internally
|
||||
@ -476,7 +478,7 @@ impl Grid {
|
||||
viewport: vec![Row::new().canonical()],
|
||||
lines_below: vec![],
|
||||
horizontal_tabstops: create_horizontal_tabstops(columns),
|
||||
cursor: Cursor::new(0, 0),
|
||||
cursor: Cursor::new(0, 0, styled_underlines),
|
||||
cursor_is_hidden: false,
|
||||
saved_cursor_position: None,
|
||||
scroll_region: None,
|
||||
@ -517,6 +519,7 @@ impl Grid {
|
||||
style,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
}
|
||||
}
|
||||
pub fn render_full_viewport(&mut self) {
|
||||
@ -1688,7 +1691,7 @@ impl Grid {
|
||||
self.cursor_key_mode = false;
|
||||
self.scroll_region = None;
|
||||
self.clear_viewport_before_rendering = true;
|
||||
self.cursor = Cursor::new(0, 0);
|
||||
self.cursor = Cursor::new(0, 0, self.styled_underlines);
|
||||
self.saved_cursor_position = None;
|
||||
self.active_charset = Default::default();
|
||||
self.erasure_mode = false;
|
||||
@ -2132,7 +2135,7 @@ impl Grid {
|
||||
self.lines_below.clear();
|
||||
}
|
||||
pub fn reset_cursor_position(&mut self) {
|
||||
self.cursor = Cursor::new(0, 0);
|
||||
self.cursor = Cursor::new(0, 0, self.styled_underlines);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2614,8 +2617,10 @@ impl Perform for Grid {
|
||||
std::mem::replace(&mut self.lines_above, VecDeque::new());
|
||||
let current_viewport =
|
||||
std::mem::replace(&mut self.viewport, vec![Row::new().canonical()]);
|
||||
let current_cursor =
|
||||
std::mem::replace(&mut self.cursor, Cursor::new(0, 0));
|
||||
let current_cursor = std::mem::replace(
|
||||
&mut self.cursor,
|
||||
Cursor::new(0, 0, self.styled_underlines),
|
||||
);
|
||||
let sixel_image_store = self.sixel_grid.sixel_image_store.clone();
|
||||
let alternate_sixelgrid = std::mem::replace(
|
||||
&mut self.sixel_grid,
|
||||
|
@ -52,6 +52,7 @@ macro_rules! get_or_create_grid {
|
||||
$self.style.clone(),
|
||||
$self.debug,
|
||||
$self.arrow_fonts,
|
||||
$self.styled_underlines,
|
||||
);
|
||||
grid.hide_cursor();
|
||||
grid
|
||||
@ -88,6 +89,7 @@ pub(crate) struct PluginPane {
|
||||
requesting_permissions: Option<PluginPermission>,
|
||||
debug: bool,
|
||||
arrow_fonts: bool,
|
||||
styled_underlines: bool,
|
||||
}
|
||||
|
||||
impl PluginPane {
|
||||
@ -107,6 +109,7 @@ impl PluginPane {
|
||||
invoked_with: Option<Run>,
|
||||
debug: bool,
|
||||
arrow_fonts: bool,
|
||||
styled_underlines: bool,
|
||||
) -> Self {
|
||||
let loading_indication = LoadingIndication::new(title.clone()).with_colors(style.colors);
|
||||
let initial_loading_message = loading_indication.to_string();
|
||||
@ -139,6 +142,7 @@ impl PluginPane {
|
||||
requesting_permissions: None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
};
|
||||
for client_id in currently_connected_clients {
|
||||
plugin.handle_plugin_bytes(client_id, initial_loading_message.as_bytes().to_vec());
|
||||
|
@ -129,7 +129,7 @@ impl NamedColor {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Default)]
|
||||
#[derive(Clone, Copy, Debug, Default)]
|
||||
pub struct CharacterStyles {
|
||||
pub foreground: Option<AnsiCode>,
|
||||
pub background: Option<AnsiCode>,
|
||||
@ -147,6 +147,24 @@ pub struct CharacterStyles {
|
||||
pub styled_underlines_enabled: bool,
|
||||
}
|
||||
|
||||
impl PartialEq for CharacterStyles {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.foreground == other.foreground
|
||||
&& self.background == other.background
|
||||
&& self.underline_color == other.underline_color
|
||||
&& self.strike == other.strike
|
||||
&& self.hidden == other.hidden
|
||||
&& self.reverse == other.reverse
|
||||
&& self.slow_blink == other.slow_blink
|
||||
&& self.fast_blink == other.fast_blink
|
||||
&& self.underline == other.underline
|
||||
&& self.bold == other.bold
|
||||
&& self.dim == other.dim
|
||||
&& self.italic == other.italic
|
||||
&& self.link_anchor == other.link_anchor
|
||||
}
|
||||
}
|
||||
|
||||
impl CharacterStyles {
|
||||
pub fn new() -> Self {
|
||||
Self::default()
|
||||
@ -232,8 +250,8 @@ impl CharacterStyles {
|
||||
}
|
||||
|
||||
if *new_styles == RESET_STYLES {
|
||||
*self = RESET_STYLES;
|
||||
return Some(RESET_STYLES);
|
||||
*self = RESET_STYLES.enable_styled_underlines(self.styled_underlines_enabled);
|
||||
return Some(RESET_STYLES.enable_styled_underlines(self.styled_underlines_enabled));
|
||||
}
|
||||
|
||||
// create diff from all changed styles
|
||||
@ -801,11 +819,11 @@ pub struct Cursor {
|
||||
}
|
||||
|
||||
impl Cursor {
|
||||
pub fn new(x: usize, y: usize) -> Self {
|
||||
pub fn new(x: usize, y: usize, styled_underlines: bool) -> Self {
|
||||
Cursor {
|
||||
x,
|
||||
y,
|
||||
pending_styles: RESET_STYLES,
|
||||
pending_styles: RESET_STYLES.enable_styled_underlines(styled_underlines),
|
||||
charsets: Default::default(),
|
||||
shape: CursorShape::Initial,
|
||||
}
|
||||
|
@ -789,6 +789,7 @@ impl TerminalPane {
|
||||
invoked_with: Option<Run>,
|
||||
debug: bool,
|
||||
arrow_fonts: bool,
|
||||
styled_underlines: bool,
|
||||
) -> TerminalPane {
|
||||
let initial_pane_title =
|
||||
initial_pane_title.unwrap_or_else(|| format!("Pane #{}", pane_index));
|
||||
@ -803,6 +804,7 @@ impl TerminalPane {
|
||||
style.clone(),
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
TerminalPane {
|
||||
frame: HashMap::new(),
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,7 @@ fn create_pane() -> TerminalPane {
|
||||
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -45,6 +46,7 @@ fn create_pane() -> TerminalPane {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
let content = read_fixture();
|
||||
terminal_pane.handle_pty_bytes(content);
|
||||
|
@ -38,6 +38,7 @@ pub fn scrolling_inside_a_pane() {
|
||||
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -53,6 +54,7 @@ pub fn scrolling_inside_a_pane() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
let mut text_to_fill_pane = String::new();
|
||||
for i in 0..30 {
|
||||
@ -84,6 +86,7 @@ pub fn sixel_image_inside_terminal_pane() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -99,6 +102,7 @@ pub fn sixel_image_inside_terminal_pane() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
let sixel_image_bytes = "\u{1b}Pq
|
||||
#0;2;0;0;0#1;2;100;100;0#2;2;0;100;0
|
||||
@ -130,6 +134,7 @@ pub fn partial_sixel_image_inside_terminal_pane() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -145,6 +150,7 @@ pub fn partial_sixel_image_inside_terminal_pane() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
let pane_content = read_fixture("sixel-image-500px.six");
|
||||
terminal_pane.handle_pty_bytes(pane_content);
|
||||
@ -170,6 +176,7 @@ pub fn overflowing_sixel_image_inside_terminal_pane() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -185,6 +192,7 @@ pub fn overflowing_sixel_image_inside_terminal_pane() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
let pane_content = read_fixture("sixel-image-500px.six");
|
||||
terminal_pane.handle_pty_bytes(pane_content);
|
||||
@ -209,6 +217,7 @@ pub fn scrolling_through_a_sixel_image() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -224,6 +233,7 @@ pub fn scrolling_through_a_sixel_image() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
let mut text_to_fill_pane = String::new();
|
||||
for i in 0..30 {
|
||||
@ -259,6 +269,7 @@ pub fn multiple_sixel_images_in_pane() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -274,6 +285,7 @@ pub fn multiple_sixel_images_in_pane() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
let mut text_to_fill_pane = String::new();
|
||||
for i in 0..5 {
|
||||
@ -307,6 +319,7 @@ pub fn resizing_pane_with_sixel_images() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -322,6 +335,7 @@ pub fn resizing_pane_with_sixel_images() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
let mut text_to_fill_pane = String::new();
|
||||
for i in 0..5 {
|
||||
@ -358,6 +372,7 @@ pub fn changing_character_cell_size_with_sixel_images() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -373,6 +388,7 @@ pub fn changing_character_cell_size_with_sixel_images() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
let mut text_to_fill_pane = String::new();
|
||||
for i in 0..5 {
|
||||
@ -414,6 +430,7 @@ pub fn keep_working_after_corrupted_sixel_image() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -429,6 +446,7 @@ pub fn keep_working_after_corrupted_sixel_image() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
|
||||
let sixel_image_bytes = "\u{1b}PI AM CORRUPTED BWAHAHAq
|
||||
@ -468,6 +486,7 @@ pub fn pane_with_frame_position_is_on_frame() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -483,6 +502,7 @@ pub fn pane_with_frame_position_is_on_frame() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
|
||||
terminal_pane.set_content_offset(Offset::frame(1));
|
||||
@ -558,6 +578,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 mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -573,6 +594,7 @@ pub fn pane_with_bottom_and_right_borders_position_is_on_frame() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
|
||||
terminal_pane.set_content_offset(Offset::shift(1, 1));
|
||||
@ -648,6 +670,7 @@ pub fn frameless_pane_position_is_on_frame() {
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut terminal_pane = TerminalPane::new(
|
||||
pid,
|
||||
fake_win_size,
|
||||
@ -663,6 +686,7 @@ pub fn frameless_pane_position_is_on_frame() {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
); // 0 is the pane index
|
||||
|
||||
terminal_pane.set_content_offset(Offset::default());
|
||||
|
@ -1171,6 +1171,7 @@ impl Screen {
|
||||
self.default_shell.clone(),
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
self.tabs.insert(tab_index, tab);
|
||||
Ok(())
|
||||
|
@ -42,6 +42,7 @@ pub struct LayoutApplier<'a> {
|
||||
os_api: Box<dyn ServerOsApi>,
|
||||
debug: bool,
|
||||
arrow_fonts: bool,
|
||||
styled_underlines: bool,
|
||||
}
|
||||
|
||||
impl<'a> LayoutApplier<'a> {
|
||||
@ -63,6 +64,7 @@ impl<'a> LayoutApplier<'a> {
|
||||
os_api: &Box<dyn ServerOsApi>,
|
||||
debug: bool,
|
||||
arrow_fonts: bool,
|
||||
styled_underlines: bool,
|
||||
) -> Self {
|
||||
let viewport = viewport.clone();
|
||||
let senders = senders.clone();
|
||||
@ -93,6 +95,7 @@ impl<'a> LayoutApplier<'a> {
|
||||
os_api,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
}
|
||||
}
|
||||
pub fn apply_layout(
|
||||
@ -260,6 +263,7 @@ impl<'a> LayoutApplier<'a> {
|
||||
layout.run.clone(),
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
if let Some(pane_initial_contents) = &layout.pane_initial_contents {
|
||||
new_plugin.handle_pty_bytes(pane_initial_contents.as_bytes().into());
|
||||
@ -297,6 +301,7 @@ impl<'a> LayoutApplier<'a> {
|
||||
layout.run.clone(),
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
if let Some(pane_initial_contents) = &layout.pane_initial_contents {
|
||||
new_pane.handle_pty_bytes(pane_initial_contents.as_bytes().into());
|
||||
@ -387,6 +392,7 @@ impl<'a> LayoutApplier<'a> {
|
||||
floating_pane_layout.run.clone(),
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
if let Some(pane_initial_contents) = &floating_pane_layout.pane_initial_contents {
|
||||
new_pane.handle_pty_bytes(pane_initial_contents.as_bytes().into());
|
||||
@ -427,6 +433,7 @@ impl<'a> LayoutApplier<'a> {
|
||||
floating_pane_layout.run.clone(),
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
if let Some(pane_initial_contents) = &floating_pane_layout.pane_initial_contents {
|
||||
new_pane.handle_pty_bytes(pane_initial_contents.as_bytes().into());
|
||||
|
@ -186,6 +186,7 @@ pub(crate) struct Tab {
|
||||
default_shell: Option<PathBuf>,
|
||||
debug: bool,
|
||||
arrow_fonts: bool,
|
||||
styled_underlines: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
|
||||
@ -535,6 +536,7 @@ impl Tab {
|
||||
default_shell: Option<PathBuf>,
|
||||
debug: bool,
|
||||
arrow_fonts: bool,
|
||||
styled_underlines: bool,
|
||||
) -> Self {
|
||||
let name = if name.is_empty() {
|
||||
format!("Tab #{}", index + 1)
|
||||
@ -624,6 +626,7 @@ impl Tab {
|
||||
default_shell,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
}
|
||||
}
|
||||
|
||||
@ -656,6 +659,7 @@ impl Tab {
|
||||
&self.os_api,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
)
|
||||
.apply_layout(
|
||||
layout,
|
||||
@ -718,6 +722,7 @@ impl Tab {
|
||||
&self.os_api,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
)
|
||||
.apply_floating_panes_layout_to_existing_panes(
|
||||
&layout_candidate,
|
||||
@ -773,6 +778,7 @@ impl Tab {
|
||||
&self.os_api,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
)
|
||||
.apply_tiled_panes_layout_to_existing_panes(
|
||||
&layout_candidate,
|
||||
@ -1070,6 +1076,7 @@ impl Tab {
|
||||
invoked_with,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
)) as Box<dyn Pane>
|
||||
},
|
||||
PaneId::Plugin(plugin_pid) => {
|
||||
@ -1093,6 +1100,7 @@ impl Tab {
|
||||
invoked_with,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
)) as Box<dyn Pane>
|
||||
},
|
||||
};
|
||||
@ -1130,6 +1138,7 @@ impl Tab {
|
||||
None,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
new_pane.update_name("EDITING SCROLLBACK"); // we do this here and not in the
|
||||
// constructor so it won't be overrided
|
||||
@ -1203,6 +1212,7 @@ impl Tab {
|
||||
run,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
let replaced_pane = if self.floating_panes.panes_contain(&old_pane_id) {
|
||||
self.floating_panes
|
||||
@ -1256,6 +1266,7 @@ impl Tab {
|
||||
run,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
let replaced_pane = if self.floating_panes.panes_contain(&old_pane_id) {
|
||||
self.floating_panes
|
||||
@ -1325,6 +1336,7 @@ impl Tab {
|
||||
None,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
self.tiled_panes
|
||||
.split_pane_horizontally(pid, Box::new(new_terminal), client_id);
|
||||
@ -1383,6 +1395,7 @@ impl Tab {
|
||||
None,
|
||||
self.debug,
|
||||
self.arrow_fonts,
|
||||
self.styled_underlines,
|
||||
);
|
||||
self.tiled_panes
|
||||
.split_pane_vertically(pid, Box::new(new_terminal), client_id);
|
||||
|
@ -225,6 +225,7 @@ fn create_new_tab(size: Size, default_mode: ModeInfo) -> Tab {
|
||||
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut tab = Tab::new(
|
||||
index,
|
||||
position,
|
||||
@ -249,6 +250,7 @@ fn create_new_tab(size: Size, default_mode: ModeInfo) -> Tab {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
tab.apply_layout(
|
||||
TiledPaneLayout::default(),
|
||||
@ -300,6 +302,7 @@ fn create_new_tab_with_swap_layouts(
|
||||
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut tab = Tab::new(
|
||||
index,
|
||||
position,
|
||||
@ -324,6 +327,7 @@ fn create_new_tab_with_swap_layouts(
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
let (
|
||||
base_layout,
|
||||
@ -377,6 +381,7 @@ fn create_new_tab_with_os_api(
|
||||
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut tab = Tab::new(
|
||||
index,
|
||||
position,
|
||||
@ -401,6 +406,7 @@ fn create_new_tab_with_os_api(
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
tab.apply_layout(
|
||||
TiledPaneLayout::default(),
|
||||
@ -440,6 +446,7 @@ fn create_new_tab_with_layout(size: Size, default_mode: ModeInfo, layout: &str)
|
||||
let (tab_layout, floating_panes_layout) = layout.new_tab();
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut tab = Tab::new(
|
||||
index,
|
||||
position,
|
||||
@ -464,6 +471,7 @@ fn create_new_tab_with_layout(size: Size, default_mode: ModeInfo, layout: &str)
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
let pane_ids = tab_layout
|
||||
.extract_run_instructions()
|
||||
@ -517,6 +525,7 @@ fn create_new_tab_with_mock_pty_writer(
|
||||
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut tab = Tab::new(
|
||||
index,
|
||||
position,
|
||||
@ -541,6 +550,7 @@ fn create_new_tab_with_mock_pty_writer(
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
tab.apply_layout(
|
||||
TiledPaneLayout::default(),
|
||||
@ -585,6 +595,7 @@ fn create_new_tab_with_sixel_support(
|
||||
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut tab = Tab::new(
|
||||
index,
|
||||
position,
|
||||
@ -609,6 +620,7 @@ fn create_new_tab_with_sixel_support(
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
tab.apply_layout(
|
||||
TiledPaneLayout::default(),
|
||||
@ -646,6 +658,7 @@ fn take_snapshot(ansi_instructions: &str, rows: usize, columns: usize, palette:
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut grid = Grid::new(
|
||||
rows,
|
||||
columns,
|
||||
@ -657,6 +670,7 @@ fn take_snapshot(ansi_instructions: &str, rows: usize, columns: usize, palette:
|
||||
Style::default(),
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
let mut vte_parser = vte::Parser::new();
|
||||
for &byte in ansi_instructions.as_bytes() {
|
||||
@ -679,6 +693,7 @@ fn take_snapshot_with_sixel(
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut grid = Grid::new(
|
||||
rows,
|
||||
columns,
|
||||
@ -690,6 +705,7 @@ fn take_snapshot_with_sixel(
|
||||
Style::default(),
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
let mut vte_parser = vte::Parser::new();
|
||||
for &byte in ansi_instructions.as_bytes() {
|
||||
@ -709,6 +725,7 @@ fn take_snapshot_and_cursor_position(
|
||||
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut grid = Grid::new(
|
||||
rows,
|
||||
columns,
|
||||
@ -720,6 +737,7 @@ fn take_snapshot_and_cursor_position(
|
||||
Style::default(),
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
let mut vte_parser = vte::Parser::new();
|
||||
for &byte in ansi_instructions.as_bytes() {
|
||||
|
@ -166,6 +166,7 @@ fn create_new_tab(size: Size) -> Tab {
|
||||
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut tab = Tab::new(
|
||||
index,
|
||||
position,
|
||||
@ -190,6 +191,7 @@ fn create_new_tab(size: Size) -> Tab {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
tab.apply_layout(
|
||||
TiledPaneLayout::default(),
|
||||
@ -226,6 +228,7 @@ fn create_new_tab_with_layout(size: Size, layout: TiledPaneLayout) -> Tab {
|
||||
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut tab = Tab::new(
|
||||
index,
|
||||
position,
|
||||
@ -250,6 +253,7 @@ fn create_new_tab_with_layout(size: Size, layout: TiledPaneLayout) -> Tab {
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
let mut new_terminal_ids = vec![];
|
||||
for i in 0..layout.extract_run_instructions().len() {
|
||||
@ -292,6 +296,7 @@ fn create_new_tab_with_cell_size(
|
||||
let terminal_emulator_color_codes = Rc::new(RefCell::new(HashMap::new()));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut tab = Tab::new(
|
||||
index,
|
||||
position,
|
||||
@ -316,6 +321,7 @@ fn create_new_tab_with_cell_size(
|
||||
None,
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
tab.apply_layout(
|
||||
TiledPaneLayout::default(),
|
||||
|
@ -68,6 +68,7 @@ fn take_snapshots_and_cursor_coordinates_from_render_events<'a>(
|
||||
})));
|
||||
let debug = false;
|
||||
let arrow_fonts = true;
|
||||
let styled_underlines = true;
|
||||
let mut grid = Grid::new(
|
||||
screen_size.rows,
|
||||
screen_size.cols,
|
||||
@ -79,6 +80,7 @@ fn take_snapshots_and_cursor_coordinates_from_render_events<'a>(
|
||||
Style::default(),
|
||||
debug,
|
||||
arrow_fonts,
|
||||
styled_underlines,
|
||||
);
|
||||
let snapshots: Vec<(Option<(usize, usize)>, String)> = all_events
|
||||
.filter_map(|server_instruction| {
|
||||
|
Loading…
Reference in New Issue
Block a user