From c410ba4d42d1d8248fa12663b856e2d5768f4828 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 21 Aug 2022 09:28:07 +0200 Subject: [PATCH] tweaks: reshuffle two lines, for conciseness and in preparation --- src/prompt.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/prompt.c b/src/prompt.c index e5917aa4..eb09b96d 100644 --- 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;