mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
Snipping a useless setting of answer -- the Replace is being /cancelled/,
and the next time a Search or Replace is run, this answer is overwritten with an empty string. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5749 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
9f93b33d29
commit
311f0e8734
@ -8,6 +8,7 @@
|
|||||||
* src/search.c (do_gotolinecolumn): Delete another unneeded variable.
|
* src/search.c (do_gotolinecolumn): Delete another unneeded variable.
|
||||||
* src/search.c (search_init): Snip an always-FALSE condition.
|
* src/search.c (search_init): Snip an always-FALSE condition.
|
||||||
* src/search.c (search_init): Reshuffle stuff to reduce indentation.
|
* src/search.c (search_init): Reshuffle stuff to reduce indentation.
|
||||||
|
* src/search.c (do_replace): Snip a useless setting of answer.
|
||||||
|
|
||||||
2016-03-17 Benno Schulenberg <bensberg@justemail.net>
|
2016-03-17 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/search.c (do_research): Use the Search key bindings also during
|
* src/search.c (do_research): Use the Search key bindings also during
|
||||||
|
@ -861,12 +861,10 @@ void do_replace(void)
|
|||||||
update_history(&replace_history, answer);
|
update_history(&replace_history, answer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (i != 0 && i != -2) {
|
/* When cancelled, or when a function was run, get out. */
|
||||||
if (i == -1) { /* Cancel. */
|
if (i == -1 || i > 0) {
|
||||||
if (last_replace[0] != '\0')
|
if (i == -1)
|
||||||
answer = mallocstrcpy(answer, last_replace);
|
|
||||||
statusbar(_("Cancelled"));
|
statusbar(_("Cancelled"));
|
||||||
}
|
|
||||||
search_replace_abort();
|
search_replace_abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user