Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix double borders in mode buttons.
Piotr Osiewiczd17aba4fd34a
diff --git a/crates/search/src/mode.rs b/crates/search/src/mode.rsindex ecaa00f6acc..2c180be761e 100644--- a/crates/search/src/mode.rs+++ b/crates/search/src/mode.rs@@ -51,15 +51,16 @@ impl SearchMode {pub(crate) fn border_right(&self) -> bool {match self {- SearchMode::Text => false,- _ => true,+ SearchMode::Regex => true,+ SearchMode::Text => true,+ SearchMode::Semantic => true,}}pub(crate) fn border_left(&self) -> bool {match self {- SearchMode::Regex => false,- _ => true,+ SearchMode::Text => true,+ _ => false,}}diff --git a/crates/search/src/search_bar.rs b/crates/search/src/search_bar.rsindex 00eff11f8a8..088a96b2798 100644--- a/crates/search/src/search_bar.rs+++ b/crates/search/src/search_bar.rs@@ -125,10 +125,9 @@ pub(crate) fn render_search_mode_button<V: View>(.in_state(is_active).style_for(state).clone();- if mode.button_side().is_some() {- style.container.border.left = mode.border_left();- style.container.border.right = mode.border_right();- }+ style.container.border.left = mode.border_left();+ style.container.border.right = mode.border_right();+let label = Label::new(mode.label(), style.text.clone()).contained();let mut container_style = style.container.clone();if let Some(button_side) = mode.button_side() {