Commit 4edc83c3 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: move a setting to a better place -- it needs setting just once

parent e6350aab
Showing with 3 additions and 4 deletions
+3 -4
......@@ -664,18 +664,17 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only,
if (i == -1) /* The replacing was cancelled. */
break;
else if (i == 2)
replaceall = TRUE;
}
if (i > 0 || replaceall) { /* Yes, replace it!!!! */
if (i == 1 || replaceall) { /* Yes, replace it. */
char *copy;
size_t length_change;
#ifndef NANO_TINY
add_undo(REPLACE);
#endif
if (i == 2)
replaceall = TRUE;
copy = replace_line(needle);
length_change = strlen(copy) - strlen(openfile->current->data);
......
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