mirror of
https://https.git.savannah.gnu.org/git/nano.git
synced 2026-01-26 16:09:15 +00:00
prompt: accept tabs in an external paste as literal tabs
This fixes https://savannah.gnu.org/bugs/?66892. Buglet existed since before version 2.0.0.
This commit is contained in:
parent
f2c30aa437
commit
bf39ffe903
@ -261,7 +261,7 @@ void absorb_character(int input, functionptrtype function)
|
||||
* Apart from that, only accept input when not in restricted mode, or when
|
||||
* not at the "Write File" prompt, or when there is no filename yet. */
|
||||
if (!function) {
|
||||
if (input < 0x20 || input > 0xFF || meta_key)
|
||||
if ((input < 0x20 && input != '\t') || meta_key || input > 0xFF)
|
||||
beep();
|
||||
else if (!ISSET(RESTRICTED) || currmenu != MWRITEFILE ||
|
||||
openfile->filename[0] == '\0') {
|
||||
@ -467,7 +467,11 @@ functionptrtype acquire_an_answer(int *actual, bool *listed,
|
||||
/* Check for a shortcut in the current list. */
|
||||
shortcut = get_shortcut(input);
|
||||
function = (shortcut ? shortcut->func : NULL);
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Tabs in an external paste are not commands. */
|
||||
if (input == '\t' && bracketed_paste)
|
||||
function = NULL;
|
||||
#endif
|
||||
/* When it's a normal character, add it to the answer. */
|
||||
absorb_character(input, function);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user