From 2e22b24ef2aa6ac23d130c536d8c42e41289d1f1 Mon Sep 17 00:00:00 2001 From: Piotr Kufel Date: Thu, 18 Jul 2024 15:50:43 -0700 Subject: [PATCH] Factor out style-setting code Some menu layouts support only a subset of styles, but with this change the user will still be able to configure them. This seems strictly better - if reedline starts supporting one of the existing styles for a particular layout, there won't be any need to update nushell code. --- crates/nu-cli/src/reedline_config.rs | 87 +++++++++------------------- 1 file changed, 27 insertions(+), 60 deletions(-) diff --git a/crates/nu-cli/src/reedline_config.rs b/crates/nu-cli/src/reedline_config.rs index d5d3272bc1..f6933d5162 100644 --- a/crates/nu-cli/src/reedline_config.rs +++ b/crates/nu-cli/src/reedline_config.rs @@ -193,6 +193,29 @@ fn get_style(record: &Record, name: &str, span: Span) -> Option