mirror of
https://github.com/nushell/reedline.git
synced 2024-08-18 04:10:24 +03:00
add builder functions (#731)
This commit is contained in:
parent
34af84ebe0
commit
090af4d323
@ -237,6 +237,24 @@ pub trait MenuBuilder: Menu + Sized {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Menu builder with new value for match style
|
||||||
|
/// This is the style of the part of the input text, the suggestions
|
||||||
|
/// are based on
|
||||||
|
#[must_use]
|
||||||
|
fn with_match_text_style(mut self, color: Style) -> Self {
|
||||||
|
self.settings_mut().color.match_style = color;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Menu builder with new value for selected match style
|
||||||
|
/// This is the style of the part of the input text, the suggestions
|
||||||
|
/// are based on
|
||||||
|
#[must_use]
|
||||||
|
fn with_selected_match_text_style(mut self, color: Style) -> Self {
|
||||||
|
self.settings_mut().color.selected_match_style = color;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
/// Menu builder with new value for marker
|
/// Menu builder with new value for marker
|
||||||
#[must_use]
|
#[must_use]
|
||||||
fn with_marker(mut self, marker: &str) -> Self {
|
fn with_marker(mut self, marker: &str) -> Self {
|
||||||
|
Loading…
Reference in New Issue
Block a user