diff --git a/crates/find/src/find.rs b/crates/find/src/find.rs index d393cbd9c8..2bf2e1133d 100644 --- a/crates/find/src/find.rs +++ b/crates/find/src/find.rs @@ -114,12 +114,12 @@ impl View for FindBar { .with_children(self.active_editor.as_ref().and_then(|editor| { let (_, highlighted_ranges) = editor.read(cx).highlighted_ranges_for_type::()?; - let match_ix = cmp::min(self.active_match_index? + 1, highlighted_ranges.len()); - let message = if highlighted_ranges.is_empty() { - "No matches".to_string() + let message = if let Some(match_ix) = self.active_match_index { + format!("{}/{}", match_ix + 1, highlighted_ranges.len()) } else { - format!("{}/{}", match_ix, highlighted_ranges.len()) + "No matches".to_string() }; + Some( Label::new(message, theme.find.match_index.text.clone()) .contained() diff --git a/crates/zed/assets/themes/_base.toml b/crates/zed/assets/themes/_base.toml index 69a938dacf..80d9c7cc69 100644 --- a/crates/zed/assets/themes/_base.toml +++ b/crates/zed/assets/themes/_base.toml @@ -330,6 +330,7 @@ background = "$surface.1" extends = "$text.1" padding = { left = 6, right = 6, top = 1, bottom = 1 } corner_radius = 6 +background = "$surface.1" border = { width = 1, color = "$border.0" } margin.left = 1 margin.right = 1