nano

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

commit aa257ef58e5d53fd7cba48eceec064f39ac9f2e2
parent 8daa7cbda05c2d1ec233b53462560f61e286fc2b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu, 20 Aug 2020 10:07:14 +0200

display: restore the ability to resize the screen while searching

This ability was lost in commit 92298349 from two hours ago, which
bypasses the keystroke buffer and its integrated screen resizing.

This new implementation is better than it was before, because it
responds almost instantly to a resize instead of with a delay of
up to a second.

Diffstat:
Msrc/search.c | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/search.c b/src/search.c @@ -208,6 +208,10 @@ int findnextstr(const char *needle, bool whole_word_only, int modus, meta_key = FALSE; if (func_from_key(&input) == do_cancel) { +#ifndef NANO_TINY + if (the_window_resized) + regenerate_screen(); +#endif statusbar(_("Cancelled")); /* Clear out the key buffer (in case a macro is running). */ while (input != ERR) @@ -256,6 +260,14 @@ int findnextstr(const char *needle, bool whole_word_only, int modus, break; } +#ifndef NANO_TINY + if (the_window_resized) { + regenerate_screen(); + nodelay(edit, TRUE); + statusbar(_("Searching...")); + feedback = 1; + } +#endif /* If we're back at the beginning, then there is no needle. */ if (came_full_circle) { nodelay(edit, FALSE);