tweaks: rename a function, to be more fitting and descriptive
It is not an abort but simply a bit of cleaning up.master
parent
7a09b655c1
commit
02d8da3bdd
|
@ -479,7 +479,7 @@ void do_rcfiles(void);
|
||||||
|
|
||||||
/* Most functions in search.c. */
|
/* Most functions in search.c. */
|
||||||
void not_found_msg(const char *str);
|
void not_found_msg(const char *str);
|
||||||
void search_replace_abort(void);
|
void tidy_up_after_search(void);
|
||||||
int findnextstr(const char *needle, bool whole_word_only, int modus,
|
int findnextstr(const char *needle, bool whole_word_only, int modus,
|
||||||
size_t *match_len, bool skipone, const filestruct *begin, size_t begin_x);
|
size_t *match_len, bool skipone, const filestruct *begin, size_t begin_x);
|
||||||
void do_search(void);
|
void do_search(void);
|
||||||
|
|
12
src/search.c
12
src/search.c
|
@ -68,7 +68,7 @@ void not_found_msg(const char *str)
|
||||||
|
|
||||||
/* Free a compiled regular expression, if one was compiled; and schedule a
|
/* Free a compiled regular expression, if one was compiled; and schedule a
|
||||||
* full screen refresh when the mark is on, in case the cursor has moved. */
|
* full screen refresh when the mark is on, in case the cursor has moved. */
|
||||||
void search_replace_abort(void)
|
void tidy_up_after_search(void)
|
||||||
{
|
{
|
||||||
if (have_compiled_regexp) {
|
if (have_compiled_regexp) {
|
||||||
regfree(&search_regexp);
|
regfree(&search_regexp);
|
||||||
|
@ -126,7 +126,7 @@ void search_init(bool replacing, bool keep_the_answer)
|
||||||
* nothing was searched for yet during this session, get out. */
|
* nothing was searched for yet during this session, get out. */
|
||||||
if (i == -1 || (i == -2 && *last_search == '\0')) {
|
if (i == -1 || (i == -2 && *last_search == '\0')) {
|
||||||
statusbar(_("Cancelled"));
|
statusbar(_("Cancelled"));
|
||||||
search_replace_abort();
|
tidy_up_after_search();
|
||||||
free(thedefault);
|
free(thedefault);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ void search_init(bool replacing, bool keep_the_answer)
|
||||||
/* If doing a regular-expression search, compile the
|
/* If doing a regular-expression search, compile the
|
||||||
* search string, and get out when it's invalid. */
|
* search string, and get out when it's invalid. */
|
||||||
if (ISSET(USE_REGEXP) && !regexp_init(last_search)) {
|
if (ISSET(USE_REGEXP) && !regexp_init(last_search)) {
|
||||||
search_replace_abort();
|
tidy_up_after_search();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ void search_init(bool replacing, bool keep_the_answer)
|
||||||
else
|
else
|
||||||
go_looking();
|
go_looking();
|
||||||
|
|
||||||
search_replace_abort();
|
tidy_up_after_search();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ void search_init(bool replacing, bool keep_the_answer)
|
||||||
if (func == flip_goto)
|
if (func == flip_goto)
|
||||||
do_gotolinecolumn(openfile->current->lineno,
|
do_gotolinecolumn(openfile->current->lineno,
|
||||||
openfile->placewewant + 1, TRUE, TRUE);
|
openfile->placewewant + 1, TRUE, TRUE);
|
||||||
search_replace_abort();
|
tidy_up_after_search();
|
||||||
free(thedefault);
|
free(thedefault);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -393,7 +393,7 @@ void do_research(void)
|
||||||
|
|
||||||
go_looking();
|
go_looking();
|
||||||
|
|
||||||
search_replace_abort();
|
tidy_up_after_search();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search for the global string 'last_search'. Inform the user when
|
/* Search for the global string 'last_search'. Inform the user when
|
||||||
|
|
|
@ -2780,7 +2780,7 @@ const char *do_int_speller(const char *tempfile_name)
|
||||||
do_int_spell_fix(read_buff_word);
|
do_int_spell_fix(read_buff_word);
|
||||||
|
|
||||||
free(read_buff);
|
free(read_buff);
|
||||||
search_replace_abort();
|
tidy_up_after_search();
|
||||||
refresh_needed = TRUE;
|
refresh_needed = TRUE;
|
||||||
|
|
||||||
/* Process the end of the three processes. */
|
/* Process the end of the three processes. */
|
||||||
|
|
Loading…
Reference in New Issue