From 69e4abad0ff42a1270e47e50192d9ccbe50bc3cf Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:55:01 -0500 Subject: [PATCH] hard-code selection color to be `reverse` (#14052) # Description This PR makes visual selection in Nushell a little bit more readable. ### Before ![image](https://github.com/user-attachments/assets/3020abd2-c02c-4f16-b68a-cbe72278cbc8) ### After ![image](https://github.com/user-attachments/assets/fcf919fa-bc02-449b-b5bc-ed05959cc7de) # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-cli/src/repl.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/nu-cli/src/repl.rs b/crates/nu-cli/src/repl.rs index 4ecf1cbd2f..718f85f9b6 100644 --- a/crates/nu-cli/src/repl.rs +++ b/crates/nu-cli/src/repl.rs @@ -376,7 +376,11 @@ fn loop_iteration(ctx: LoopContext) -> (bool, Stack, Reedline) { .to_string_lossy() .to_string(), )) - .with_cursor_config(cursor_config); + .with_cursor_config(cursor_config) + .with_visual_selection_style(nu_ansi_term::Style { + is_reverse: true, + ..Default::default() + }); perf!("reedline builder", start_time, use_color);