nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit c410ba4d42d1d8248fa12663b856e2d5768f4828
parent f3738fe164927883ff7ba7bc8b89a42519b121ab
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 21 Aug 2022 09:28:07 +0200

tweaks: reshuffle two lines, for conciseness and in preparation

Diffstat:
Msrc/prompt.c | 12++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/prompt.c b/src/prompt.c @@ -694,9 +694,11 @@ int ask_user(bool withall, const char *question) if (kbinput == KEY_WINCH) continue; - /* Accept the first character of an external paste. */ - if (bracketed_paste && kbinput == BRACKETED_PASTE_MARKER) + /* Accept first character of an external paste and ignore the rest. */ + if (bracketed_paste) kbinput = get_kbinput(footwin, BLIND); + while (bracketed_paste) + get_kbinput(footwin, BLIND); #endif #ifdef ENABLE_NLS @@ -768,12 +770,6 @@ int ask_user(bool withall, const char *question) #endif else beep(); - -#ifndef NANO_TINY - /* Ignore the rest of an external paste. */ - while (bracketed_paste) - kbinput = get_kbinput(footwin, BLIND); -#endif } return choice;