From b276dfedd2d13de9918b9b87a3d543e7b5eca95e Mon Sep 17 00:00:00 2001 From: sigoden Date: Mon, 30 Oct 2023 10:07:01 +0800 Subject: feat: support textwrap (#171) * feat: support textwrap * improve cmd_render_stream * done cmd_render_stream * add `-w` alias to `--wrap` * done repl_render_stream * add `config.wrap_code` * remove cached config.wrap_width * fix unxpected duplicate lines on kitty * refactor markdown render * improve render * fix test --- src/repl/prompt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/repl/prompt.rs') diff --git a/src/repl/prompt.rs b/src/repl/prompt.rs index be3763b..f48ce64 100644 --- a/src/repl/prompt.rs +++ b/src/repl/prompt.rs @@ -41,15 +41,15 @@ impl ReplPrompt { } pub fn get_colors(config: &SharedConfig) -> (Color, nu_ansi_term::Color, Color, Color) { - let (highlight, light_theme) = config.read().get_render_options(); - if highlight { + let render_options = config.read().get_render_options(); + if render_options.highlight { ( PROMPT_COLOR, PROMPT_MULTILINE_COLOR, INDICATOR_COLOR, PROMPT_RIGHT_COLOR, ) - } else if light_theme { + } else if render_options.light_theme { ( Color::Black, nu_ansi_term::Color::Black, -- cgit v1.2.3