Not bothering to set the current answer to the empty string,
as do_prompt() can handle a NULL. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5743 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
a6740ba3fd
commit
90cffe3fd0
|
@ -1,6 +1,8 @@
|
||||||
2016-03-19 Benno Schulenberg <bensberg@justemail.net>
|
2016-03-19 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/search.c (search_init): Always remember the last typed string,
|
* src/search.c (search_init): Always remember the last typed string,
|
||||||
also when it's an invalid regex. This fixes Savannah bug #47440.
|
also when it's an invalid regex. This fixes Savannah bug #47440.
|
||||||
|
* src/search.c (search_init, do_replace): Don't bother setting the
|
||||||
|
current answer to the empty string, as do_prompt() can handle a NULL.
|
||||||
|
|
||||||
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
|
||||||
|
|
|
@ -132,10 +132,6 @@ int search_init(bool replacing, bool use_answer)
|
||||||
static char *backupstring = NULL;
|
static char *backupstring = NULL;
|
||||||
/* The search string we'll be using. */
|
/* The search string we'll be using. */
|
||||||
|
|
||||||
/* If backupstring doesn't exist, initialize it to "". */
|
|
||||||
if (backupstring == NULL)
|
|
||||||
backupstring = mallocstrcpy(NULL, "");
|
|
||||||
|
|
||||||
/* If use_answer is TRUE, set backupstring to answer and get out. */
|
/* If use_answer is TRUE, set backupstring to answer and get out. */
|
||||||
if (use_answer) {
|
if (use_answer) {
|
||||||
backupstring = mallocstrcpy(backupstring, answer);
|
backupstring = mallocstrcpy(backupstring, answer);
|
||||||
|
@ -845,13 +841,11 @@ void do_replace(void)
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
last_replace = mallocstrcpy(last_replace, "");
|
|
||||||
|
|
||||||
i = do_prompt(FALSE,
|
i = do_prompt(FALSE,
|
||||||
#ifndef DISABLE_TABCOMP
|
#ifndef DISABLE_TABCOMP
|
||||||
TRUE,
|
TRUE,
|
||||||
#endif
|
#endif
|
||||||
MREPLACEWITH, last_replace,
|
MREPLACEWITH, NULL,
|
||||||
#ifndef DISABLE_HISTORIES
|
#ifndef DISABLE_HISTORIES
|
||||||
&replace_history,
|
&replace_history,
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue