mirror of git://git.sv.gnu.org/nano.git
tweaks: implement the fix of the previous commit somewhat differently
This commit is contained in:
parent
ee1a1306e2
commit
39db2e9d66
11
src/search.c
11
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. */
|
||||
|
|
Loading…
Reference in New Issue