Fix search/replace history adding blank lines, yuck
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1335 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
5beed509a6
Коммит
63287926cb
4
search.c
4
search.c
@ -453,6 +453,7 @@ int do_search(void)
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* add this search string to the search history list */
|
||||
if (strcmp(answer, ""))
|
||||
update_history(&search_history, answer);
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
@ -739,6 +740,7 @@ int do_replace(void)
|
||||
}
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
if (strcmp(answer, ""))
|
||||
update_history(&search_history, answer);
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
@ -788,7 +790,7 @@ int do_replace(void)
|
||||
_("Replace with"));
|
||||
}
|
||||
#ifndef NANO_SMALL
|
||||
if (i == 0)
|
||||
if (i == 0 && strcmp(answer, ""))
|
||||
update_history(&replace_history, answer);
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user