diff --git a/crates/find/src/find.rs b/crates/find/src/find.rs index d393cbd9c84d6b32cbb6c5ac336a0097253b79f1..2bf2e1133df4975cb74bb3f1f78c9c802c35b00a 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 69a938dacf8d71d27f730ea7084938880bd30a57..80d9c7cc697762c874fda9b4db6717de5b8d1d06 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