aboutsummaryrefslogtreecommitdiff
path: root/src/config/sidebar.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-11 00:55:19 +0300
committerGitHub <noreply@github.com>2026-09-11 00:55:19 +0300
commit58271459401fa461707c042f7f03867ddcfff3ea (patch)
treed8ae601d636858d9fafba62332870144059b2a3b /src/config/sidebar.rs
parent043b804c44665b07bd503fdad896bbe0a29311a0 (diff)
feat: support conditional sidebar token hiding (#3925)
Diffstat (limited to 'src/config/sidebar.rs')
-rw-r--r--src/config/sidebar.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/sidebar.rs b/src/config/sidebar.rs
index 0b489765..9a4cb5e0 100644
--- a/src/config/sidebar.rs
+++ b/src/config/sidebar.rs
@@ -139,10 +139,10 @@ pub enum SpaceSidebarToken {
}
impl AgentSidebarToken {
- pub(crate) fn style_for_value(&self, value: &str) -> SidebarTokenStyle {
+ pub(crate) fn style_for_value(&self, value: &str) -> Option<SidebarTokenStyle> {
match self {
Self::Styled { style, rules, .. } => rules::matching_style(rules, *style, value),
- _ => SidebarTokenStyle::default(),
+ _ => Some(SidebarTokenStyle::default()),
}
}
@@ -155,10 +155,10 @@ impl AgentSidebarToken {
}
impl SpaceSidebarToken {
- pub(crate) fn style_for_value(&self, value: &str) -> SidebarTokenStyle {
+ pub(crate) fn style_for_value(&self, value: &str) -> Option<SidebarTokenStyle> {
match self {
Self::Styled { style, rules, .. } => rules::matching_style(rules, *style, value),
- _ => SidebarTokenStyle::default(),
+ _ => Some(SidebarTokenStyle::default()),
}
}