mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-04 00:24:26 +03:00
verbatim: turn bracketed-paste mode off while waiting for input
This allows pasting six hexadecimal digits after typing M-V
in order to enter a specific Unicode character.
This fixes https://savannah.gnu.org/bugs/?58730.
Bug existed since version 4.8, since bracketed pastes
were introduced in commit f705a967
.
This commit is contained in:
parent
1542cbf942
commit
97a993d401
12
src/winio.c
12
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))
|
||||
|
Loading…
Reference in New Issue
Block a user