diff --git a/src/winio.c b/src/winio.c index f69a5595..89908dbd 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1545,6 +1545,12 @@ char *get_verbatim_kbinput(WINDOW *win, size_t *count) if (!ISSET(RAW_SEQUENCES)) keypad(win, FALSE); +#ifndef NANO_TINY + /* Turn bracketed-paste mode off. */ + printf("\e[?2004l"); + fflush(stdout); +#endif + /* Read in a single byte or two escapes. */ input = parse_verbatim_kbinput(win, count); @@ -1560,6 +1566,12 @@ char *get_verbatim_kbinput(WINDOW *win, size_t *count) } } +#ifndef NANO_TINY + /* Turn bracketed-paste mode back on. */ + printf("\e[?2004h"); + fflush(stdout); +#endif + /* Turn flow control characters back on if necessary and turn the * keypad back on if necessary now that we're done. */ if (ISSET(PRESERVE))