From dea83c3a6a2b258212b4cafa1f70ebd466064df8 Mon Sep 17 00:00:00 2001 From: Dustin Rodrigues Date: Tue, 5 Jan 2021 00:49:24 -0500 Subject: [PATCH] only disable bracketed paste for GNU Readline, not libedit --- Modules/readline.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Modules/readline.c b/Modules/readline.c index 930aa44eb6c..b66616295ac 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -212,7 +212,9 @@ readline_read_init_file_impl(PyObject *module, PyObject *filename_obj) errno = rl_read_init_file(NULL); if (errno) return PyErr_SetFromErrno(PyExc_OSError); - rl_variable_bind ("enable-bracketed-paste", "off"); + if (!using_libedit_emulation) { + rl_variable_bind ("enable-bracketed-paste", "off"); + } Py_RETURN_NONE; } @@ -1242,7 +1244,9 @@ setup_readline(readlinestate *mod_state) else rl_initialize(); - rl_variable_bind ("enable-bracketed-paste", "off"); + if (!using_libedit_emulation) { + rl_variable_bind ("enable-bracketed-paste", "off"); + } RESTORE_LOCALE(saved_locale) return 0;