diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs index 022e84ae1..7db9b09d9 100644 --- a/default-plugins/status-bar/src/main.rs +++ b/default-plugins/status-bar/src/main.rs @@ -254,7 +254,6 @@ impl ZellijPlugin for State { }; if rows == 1 && !self.classic_ui { - // one_line_ui(help, tab_info, cols, separator, ) let active_tab = self.tabs.iter().find(|t| t.active); print!( "{}", diff --git a/default-plugins/tab-bar/src/line.rs b/default-plugins/tab-bar/src/line.rs index e4f84d32b..349981f4d 100644 --- a/default-plugins/tab-bar/src/line.rs +++ b/default-plugins/tab-bar/src/line.rs @@ -413,192 +413,6 @@ pub fn style_key_with_modifier(keyvec: &[KeyWithModifier], color_index: Option, -// mode_info: &ModeInfo, -// ) -> LinePart { -// let mut ret = LinePart::default(); -// let palette = mode_info.style.colors; -// if keyvec.is_empty() { -// return ret; -// } -// -// let text_color = palette_match!(match palette.theme_hue { -// ThemeHue::Dark => palette.white, -// ThemeHue::Light => palette.black, -// }); -// let green_color = palette_match!(palette.green); -// let orange_color = palette_match!(palette.orange); -// // let orange_color = palette_match!(palette.magenta); -// -// let common_modifiers = get_common_modifiers(keyvec.iter().collect()); -// -// let no_common_modifier = common_modifiers.is_empty(); -// let modifier_str = common_modifiers -// .iter() -// .map(|m| m.to_string()) -// .collect::>() -// .join("-"); -// let painted_modifier = if modifier_str.is_empty() { -// LinePart::default() -// } else { -// let modifier_str = format!(" {}", modifier_str); -// let len = modifier_str.chars().count(); -// if let Some(background) = background { -// let background = palette_match!(background); -// let len = modifier_str.chars().count(); -// let part = Style::new() -// .fg(orange_color) -// .on(background) -// .bold() -// .paint(modifier_str).to_string(); -// LinePart { -// part, -// len, -// tab_index: None, -// } -// } else { -// LinePart { -// part: Style::new().fg(orange_color).bold().paint(modifier_str).to_string(), -// len, -// tab_index: None, -// } -// } -// }; -// ret.append(&painted_modifier); -// -// // Prints key group start -// // let group_start_str = if no_common_modifier { "<" } else { " + <" }; -// // let group_start_str = if no_common_modifier { " " } else { " " }; -// let group_start_str = if keyvec.len() > 1 { " <" } else { " " }; -// if let Some(background) = background { -// let background = palette_match!(background); -// let part = Style::new() -// .fg(text_color) -// // .fg(orange_color) -// .on(background) -// .bold() -// .paint(group_start_str).to_string(); -// let len = group_start_str.chars().count(); -// ret.append(&LinePart { part, len, tab_index: None }); -// } else { -// let len = group_start_str.chars().count(); -// let part = Style::new().fg(text_color).bold().paint(group_start_str).to_string(); -// ret.append(&LinePart { part, len, tab_index: None }); -// } -// -// // Prints the keys -// let key = keyvec -// .iter() -// .map(|key| { -// if no_common_modifier { -// format!("{}", key) -// } else { -// let key_modifier_for_key = key -// .key_modifiers -// .iter() -// .filter(|m| !common_modifiers.contains(m)) -// .map(|m| m.to_string()) -// .collect::>() -// .join(" "); -// if key_modifier_for_key.is_empty() { -// format!("{}", key.bare_key) -// } else { -// format!("{} {}", key_modifier_for_key, key.bare_key) -// } -// } -// }) -// .collect::>(); -// -// // Special handling of some pre-defined keygroups -// let key_string = key.join(""); -// let key_separator = match &key_string[..] { -// "HJKL" => "", -// "hjkl" => "", -// "←↓↑→" => "", -// "←→" => "", -// "↓↑" => "", -// "[]" => "", -// _ => "|", -// }; -// -// for (idx, key) in key.iter().enumerate() { -// if idx > 0 && !key_separator.is_empty() { -// if let Some(background) = background { -// let background = palette_match!(background); -// ret.append( -// &LinePart { -// part: Style::new() -// .fg(text_color) -// .on(background) -// .paint(key_separator).to_string(), -// len: key_separator.chars().count(), -// tab_index: None, -// } -// ); -// } else { -// ret.append(&LinePart { -// part: Style::new().fg(text_color).paint(key_separator).to_string(), -// len: key_separator.chars().count(), -// tab_index: None, -// }); -// } -// } -// if let Some(background) = background { -// let background = palette_match!(background); -// let key = key.clone(); -// let len = key.chars().count(); -// ret.append( -// &LinePart { -// part: Style::new() -// .fg(orange_color) -// .on(background) -// .bold() -// .paint(key).to_string(), -// len, -// tab_index: None, -// } -// ); -// } else { -// let key = key.clone(); -// let len = key.chars().count(); -// ret.append(&LinePart { -// part: Style::new().fg(orange_color).bold().paint(key).to_string(), -// len, -// tab_index: None, -// }); -// } -// } -// -// // let group_end_str = ">"; -// // let group_end_str = if keyvec.len() > 1 { "> " } else { " " }; -// let group_end_str = if keyvec.len() > 1 { "> " } else { " " }; -// if let Some(background) = background { -// let background = palette_match!(background); -// ret.append( -// &LinePart { -// part: Style::new() -// .fg(text_color) -// .bold() -// .on(background) -// .paint(group_end_str).to_string(), -// len: group_end_str.chars().count(), -// tab_index: None, -// } -// ); -// } else { -// ret.append( -// &LinePart { -// part: Style::new().fg(text_color).bold().paint(group_end_str).to_string(), -// len: group_end_str.chars().count(), -// tab_index: None, -// } -// ); -// } -// ret -// } -// pub fn get_common_modifiers(mut keyvec: Vec<&KeyWithModifier>) -> Vec { if keyvec.is_empty() { return vec![]; diff --git a/src/tests/e2e/cases.rs b/src/tests/e2e/cases.rs index 3d69d2056..eec66096f 100644 --- a/src/tests/e2e/cases.rs +++ b/src/tests/e2e/cases.rs @@ -848,7 +848,6 @@ pub fn typing_exit_closes_pane() { name: "Wait for pane to close", instruction: |remote_terminal: RemoteTerminal| -> bool { let mut step_is_complete = false; - // if remote_terminal.cursor_position_is(3, 2) && remote_terminal.status_bar_appears() { if remote_terminal.cursor_position_is(3, 2) && remote_terminal.status_bar_appears() { // cursor is in the original pane