From 68199968c28f57217804169e40386accce51b978 Mon Sep 17 00:00:00 2001 From: "LevitatingBusinessMan (Rein Fernhout)" Date: Wed, 8 Nov 2023 15:48:53 +0100 Subject: [PATCH 1/2] disable bracketed paste during the execution of a child --- crates/nu-cli/src/repl.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/nu-cli/src/repl.rs b/crates/nu-cli/src/repl.rs index 483f76f3148f..656e70639b93 100644 --- a/crates/nu-cli/src/repl.rs +++ b/crates/nu-cli/src/repl.rs @@ -588,6 +588,12 @@ pub fn evaluate_repl( } } + // We should not have bracketed paste enabled during the execution + // of a child. + if engine_state.get_config().bracketed_paste { + let _ = line_editor.disable_bracketed_paste(); + } + eval_source( engine_state, stack, @@ -596,8 +602,9 @@ pub fn evaluate_repl( PipelineData::empty(), false, ); + + // Ensure bracketed paste is enabled again if engine_state.get_config().bracketed_paste { - #[cfg(not(target_os = "windows"))] let _ = line_editor.enable_bracketed_paste(); } } From bc62c353dd60a7ce9dab108df3d9a8ef05d9ec9f Mon Sep 17 00:00:00 2001 From: "LevitatingBusinessMan (Rein Fernhout)" Date: Fri, 10 Nov 2023 01:21:21 +0100 Subject: [PATCH 2/2] update the git commit of reedline --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 280fcb4b4498..ce998ef01f17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4298,7 +4298,7 @@ dependencies = [ [[package]] name = "reedline" version = "0.25.0" -source = "git+https://github.com/nushell/reedline.git?branch=main#973dbb5f5f2338c18c25ce951bfa42c8d8cacfdf" +source = "git+https://github.com/nushell/reedline.git?branch=main#c853d71e6615210aad53a937b8ccb2d18cb75958" dependencies = [ "chrono", "crossterm 0.27.0",