Commit c3031b9b authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: reshuffle some of the search-and-replace cleanup calls

No related merge requests found
Showing with 3 additions and 4 deletions
+3 -4
...@@ -164,6 +164,7 @@ void search_init(bool replacing, bool keep_the_answer) ...@@ -164,6 +164,7 @@ void search_init(bool replacing, bool keep_the_answer)
else else
go_looking(); go_looking();
search_replace_abort();
return; return;
} }
...@@ -402,6 +403,8 @@ void do_research(void) ...@@ -402,6 +403,8 @@ void do_research(void)
currmenu = MWHEREIS; currmenu = MWHEREIS;
go_looking(); go_looking();
search_replace_abort();
} }
/* Search for the global string 'last_search'. Inform the user when /* Search for the global string 'last_search'. Inform the user when
...@@ -432,7 +435,6 @@ void go_looking(void) ...@@ -432,7 +435,6 @@ void go_looking(void)
#endif #endif
edit_redraw(was_current, CENTERING); edit_redraw(was_current, CENTERING);
search_replace_abort();
} }
/* Calculate the size of the replacement text, taking possible /* Calculate the size of the replacement text, taking possible
...@@ -726,7 +728,6 @@ void ask_for_replacement(void) ...@@ -726,7 +728,6 @@ void ask_for_replacement(void)
if (i == -1 || i > 0) { if (i == -1 || i > 0) {
if (i == -1) if (i == -1)
statusbar(_("Cancelled")); statusbar(_("Cancelled"));
search_replace_abort();
return; return;
} }
...@@ -748,8 +749,6 @@ void ask_for_replacement(void) ...@@ -748,8 +749,6 @@ void ask_for_replacement(void)
if (numreplaced >= 0) if (numreplaced >= 0)
statusline(HUSH, P_("Replaced %zd occurrence", statusline(HUSH, P_("Replaced %zd occurrence",
"Replaced %zd occurrences", numreplaced), numreplaced); "Replaced %zd occurrences", numreplaced), numreplaced);
search_replace_abort();
} }
/* Go to the specified line and x position. */ /* Go to the specified line and x position. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment