nano

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

commit 02d8da3bdd8312f10a832f21a29d0cd0f96690ff
parent 7a09b655c1f3726df18388fbebcb270bf4698b02
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 13 Apr 2018 10:31:18 +0200

tweaks: rename a function, to be more fitting and descriptive

It is not an abort but simply a bit of cleaning up.

Diffstat:
Msrc/proto.h | 2+-
Msrc/search.c | 12++++++------
Msrc/text.c | 2+-
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/proto.h b/src/proto.h @@ -479,7 +479,7 @@ void do_rcfiles(void); /* Most functions in search.c. */ 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, size_t *match_len, bool skipone, const filestruct *begin, size_t begin_x); void do_search(void); diff --git a/src/search.c b/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 * 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) { 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. */ if (i == -1 || (i == -2 && *last_search == '\0')) { statusbar(_("Cancelled")); - search_replace_abort(); + tidy_up_after_search(); free(thedefault); return; } @@ -146,7 +146,7 @@ void search_init(bool replacing, bool keep_the_answer) /* If doing a regular-expression search, compile the * search string, and get out when it's invalid. */ if (ISSET(USE_REGEXP) && !regexp_init(last_search)) { - search_replace_abort(); + tidy_up_after_search(); return; } @@ -155,7 +155,7 @@ void search_init(bool replacing, bool keep_the_answer) else go_looking(); - search_replace_abort(); + tidy_up_after_search(); return; } @@ -175,7 +175,7 @@ void search_init(bool replacing, bool keep_the_answer) if (func == flip_goto) do_gotolinecolumn(openfile->current->lineno, openfile->placewewant + 1, TRUE, TRUE); - search_replace_abort(); + tidy_up_after_search(); free(thedefault); return; } @@ -393,7 +393,7 @@ void do_research(void) go_looking(); - search_replace_abort(); + tidy_up_after_search(); } /* Search for the global string 'last_search'. Inform the user when diff --git a/src/text.c b/src/text.c @@ -2780,7 +2780,7 @@ const char *do_int_speller(const char *tempfile_name) do_int_spell_fix(read_buff_word); free(read_buff); - search_replace_abort(); + tidy_up_after_search(); refresh_needed = TRUE; /* Process the end of the three processes. */