Skip to content

Commit 65f477b

Browse files
authored
Merge pull request console-rs#277 from Gordon01/remove_inline_selections
Remove `ColorfulTheme.inline_selections`
2 parents af5f522 + 6be9aa7 commit 65f477b

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
* Updated MSRV to `1.63.0` due to multiple dependencies on different platforms: `rustix`, `tempfile`,`linux-raw-sys`
2323
* Removed deprecated `Confirm::with_text`
24+
* Removed deprecated `ColorfulTheme::inline_selections`
2425
* Prompt builder functions now take `mut self` instead of `&mut self`
2526
* Prompt builder functions now return `Self` instead of `&mut Self`
2627
* Prompt interaction functions now take `self` instead of `&self`

src/theme/colorful.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ pub struct ColorfulTheme {
5050
// Formats the highlighting if matched characters
5151
#[cfg(feature = "fuzzy-select")]
5252
pub fuzzy_match_highlight_style: Style,
53-
/// Show the selections from certain prompts inline
54-
pub inline_selections: bool,
5553
}
5654

5755
impl Default for ColorfulTheme {
@@ -79,7 +77,6 @@ impl Default for ColorfulTheme {
7977
fuzzy_cursor_style: Style::new().for_stderr().black().on_white(),
8078
#[cfg(feature = "fuzzy-select")]
8179
fuzzy_match_highlight_style: Style::new().for_stderr().bold(),
82-
inline_selections: true,
8380
}
8481
}
8582
}
@@ -260,15 +257,13 @@ impl Theme for ColorfulTheme {
260257

261258
write!(f, "{} ", &self.success_suffix)?;
262259

263-
if self.inline_selections {
264-
for (idx, sel) in selections.iter().enumerate() {
265-
write!(
266-
f,
267-
"{}{}",
268-
if idx == 0 { "" } else { ", " },
269-
self.values_style.apply_to(sel)
270-
)?;
271-
}
260+
for (idx, sel) in selections.iter().enumerate() {
261+
write!(
262+
f,
263+
"{}{}",
264+
if idx == 0 { "" } else { ", " },
265+
self.values_style.apply_to(sel)
266+
)?;
272267
}
273268

274269
Ok(())

0 commit comments

Comments
 (0)