diff options
| author | sigoden <sigoden@gmail.com> | 2023-10-30 10:07:01 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-30 10:07:01 +0800 |
| commit | b276dfedd2d13de9918b9b87a3d543e7b5eca95e (patch) | |
| tree | 33e1f864ef38e45ebc297e15ce519ee8105b8757 /src/repl/prompt.rs | |
| parent | 632a6fcc0bfb5b33858cd0fa3876e43ce2073cb3 (diff) | |
| download | aichat-b276dfedd2d13de9918b9b87a3d543e7b5eca95e.tar.gz | |
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
Diffstat (limited to 'src/repl/prompt.rs')
| -rw-r--r-- | src/repl/prompt.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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, |
