mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-28 15:43:09 +03:00
Removing two redundant returns, and condensing six comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5739 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
19bc63db28
commit
988274bb70
@ -1,6 +1,7 @@
|
|||||||
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
|
||||||
a Re-search, to enable cancelling. This fixes Savannah bug #47159.
|
a Re-search, to enable cancelling. This fixes Savannah bug #47159.
|
||||||
|
* src/search.c (do_replace): Remove two redundant returns.
|
||||||
|
|
||||||
2016-03-14 Benno Schulenberg <bensberg@justemail.net>
|
2016-03-14 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/color.c (color_update): Don't dereference a possible NULL.
|
* src/color.c (color_update): Don't dereference a possible NULL.
|
||||||
|
21
src/search.c
21
src/search.c
@ -424,15 +424,12 @@ void do_search(void)
|
|||||||
|
|
||||||
i = search_init(FALSE, FALSE);
|
i = search_init(FALSE, FALSE);
|
||||||
|
|
||||||
if (i == -1)
|
if (i == -1) /* Cancelled, or some other exit reason. */
|
||||||
/* Cancel, Go to Line, blank search string, or regcomp() failed. */
|
|
||||||
search_replace_abort();
|
search_replace_abort();
|
||||||
else if (i == -2)
|
else if (i == -2) /* Do a replace instead. */
|
||||||
/* Replace. */
|
|
||||||
do_replace();
|
do_replace();
|
||||||
#if !defined(NANO_TINY) || defined(HAVE_REGEX_H)
|
#if !defined(NANO_TINY) || defined(HAVE_REGEX_H)
|
||||||
else if (i == 1)
|
else if (i == 1) /* Toggled something. */
|
||||||
/* Case Sensitive, Backwards, or Regexp search toggle. */
|
|
||||||
do_search();
|
do_search();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -848,16 +845,12 @@ void do_replace(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
i = search_init(TRUE, FALSE);
|
i = search_init(TRUE, FALSE);
|
||||||
if (i == -1) {
|
|
||||||
/* Cancel, Go to Line, blank search string, or regcomp() failed. */
|
if (i == -1) /* Cancelled, or some other exit reason. */
|
||||||
search_replace_abort();
|
search_replace_abort();
|
||||||
return;
|
else if (i == -2) /* Do a search instead. */
|
||||||
} else if (i == -2) {
|
|
||||||
/* No Replace. */
|
|
||||||
do_search();
|
do_search();
|
||||||
return;
|
else if (i == 1) /* Toggled something. */
|
||||||
} else if (i == 1)
|
|
||||||
/* Case Sensitive, Backwards, or Regexp search toggle. */
|
|
||||||
do_replace();
|
do_replace();
|
||||||
|
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user