From f142a954dffbf400cbaf1c9f131fa7e3782ea41e Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 11 Mar 2024 17:05:59 -0400 Subject: [PATCH] add invokelatest to on_done callback in bracketed paste fixes #52120 --- stdlib/REPL/src/REPL.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/REPL/src/REPL.jl b/stdlib/REPL/src/REPL.jl index 0c88c84b3cbc2..e862de8bdba94 100644 --- a/stdlib/REPL/src/REPL.jl +++ b/stdlib/REPL/src/REPL.jl @@ -1347,7 +1347,7 @@ function setup_interface( # execute the statement terminal = LineEdit.terminal(s) # This is slightly ugly but ok for now raw!(terminal, false) && disable_bracketed_paste(terminal) - LineEdit.mode(s).on_done(s, LineEdit.buffer(s), true) + @invokelatest LineEdit.mode(s).on_done(s, LineEdit.buffer(s), true) raw!(terminal, true) && enable_bracketed_paste(terminal) LineEdit.push_undo(s) # when the last line is incomplete end