commit 39db2e9d660e5a409dfb1741fe0b4629b217b18a
parent ee1a1306e29ca254ffb113011ca00a512656484d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 27 Feb 2024 17:21:31 +0100
tweaks: implement the fix of the previous commit somewhat differently
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/search.c b/src/search.c
@@ -57,10 +57,6 @@ bool regexp_init(const char *regexp)
* full screen refresh when the mark is on, in case the cursor has moved. */
void tidy_up_after_search(void)
{
- /* Searching in a help text does not support regular expressions. */
- if (inhelp)
- return;
-
if (have_compiled_regexp) {
regfree(&search_regexp);
have_compiled_regexp = FALSE;
@@ -166,7 +162,9 @@ void search_init(bool replacing, bool retain_answer)
break;
}
- tidy_up_after_search();
+ if (!inhelp)
+ tidy_up_after_search();
+
free(thedefault);
}
@@ -385,7 +383,8 @@ void do_research(void)
go_looking();
- tidy_up_after_search();
+ if (!inhelp)
+ tidy_up_after_search();
}
/* Search in the backward direction for the next occurrence. */