From de7a387e4bbfdb05352ba622896713e9696dbcef Mon Sep 17 00:00:00 2001 From: Alexander Sergeev Date: Wed, 6 Sep 2023 16:59:51 +0300 Subject: [PATCH] Remove `ColorfulTheme.inline_selections` --- CHANGELOG.md | 1 + src/theme/colorful.rs | 19 +++++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4c4ef5..78b6e23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Added a `BasicHistory` implementation for `History` * Added vim mode for `FuzzySelect` * All prompts implement `Clone` +* Removed `inline_selections` from `ColorfulTheme` ### Bug fixes diff --git a/src/theme/colorful.rs b/src/theme/colorful.rs index 1537a22..53de10e 100644 --- a/src/theme/colorful.rs +++ b/src/theme/colorful.rs @@ -50,8 +50,6 @@ pub struct ColorfulTheme { // Formats the highlighting if matched characters #[cfg(feature = "fuzzy-select")] pub fuzzy_match_highlight_style: Style, - /// Show the selections from certain prompts inline - pub inline_selections: bool, } impl Default for ColorfulTheme { @@ -79,7 +77,6 @@ impl Default for ColorfulTheme { fuzzy_cursor_style: Style::new().for_stderr().black().on_white(), #[cfg(feature = "fuzzy-select")] fuzzy_match_highlight_style: Style::new().for_stderr().bold(), - inline_selections: true, } } } @@ -260,15 +257,13 @@ impl Theme for ColorfulTheme { write!(f, "{} ", &self.success_suffix)?; - if self.inline_selections { - for (idx, sel) in selections.iter().enumerate() { - write!( - f, - "{}{}", - if idx == 0 { "" } else { ", " }, - self.values_style.apply_to(sel) - )?; - } + for (idx, sel) in selections.iter().enumerate() { + write!( + f, + "{}{}", + if idx == 0 { "" } else { ", " }, + self.values_style.apply_to(sel) + )?; } Ok(())