mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
Removing an unused variable, and adjusting the introductory comment
for the recently tweaked logic. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5192 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
4e9b3687ba
commit
4e5ea18394
@ -5,6 +5,8 @@
|
||||
* src/global.c (shortcut_init): Rebind ^Y and ^V in the WhereisFile
|
||||
menu from the pointless page_up() and page_down() to the effective
|
||||
first_file() and last_file(). Also unbind some other useless keys.
|
||||
* src/browser.c (filesearch_init): Remove an unused variable, and
|
||||
adjust the introductory comment for the recently tweaked logic.
|
||||
|
||||
2015-04-11 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/search.c (do_replace_loop): Do not split off the marked region
|
||||
|
@ -697,20 +697,14 @@ void browser_select_dirname(const char *needle)
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up the system variables for a filename search. Return -1 if the
|
||||
* search should be canceled (due to Cancel, a blank search string, or a
|
||||
* failed regcomp()), return 0 on success, and return 1 on rerun calling
|
||||
* program. */
|
||||
/* Set up the system variables for a filename search. Return -1 or -2 if
|
||||
* the search should be canceled (due to Cancel or a blank search string),
|
||||
* return 0 when we have a string, and return a positive value when some
|
||||
* function was run. */
|
||||
int filesearch_init(void)
|
||||
{
|
||||
int input;
|
||||
char *buf;
|
||||
static char *backupstring = NULL;
|
||||
/* The search string we'll be using. */
|
||||
|
||||
/* If backupstring doesn't exist, initialize it to "". */
|
||||
if (backupstring == NULL)
|
||||
backupstring = mallocstrcpy(NULL, "");
|
||||
|
||||
if (last_search == NULL)
|
||||
last_search = mallocstrcpy(NULL, "");
|
||||
@ -731,7 +725,7 @@ int filesearch_init(void)
|
||||
#ifndef DISABLE_TABCOMP
|
||||
TRUE,
|
||||
#endif
|
||||
MWHEREISFILE, backupstring,
|
||||
MWHEREISFILE, NULL,
|
||||
#ifndef DISABLE_HISTORIES
|
||||
&search_history,
|
||||
#endif
|
||||
@ -740,9 +734,6 @@ int filesearch_init(void)
|
||||
/* Release buf now that we don't need it anymore. */
|
||||
free(buf);
|
||||
|
||||
free(backupstring);
|
||||
backupstring = NULL;
|
||||
|
||||
/* If only Enter was pressed but we have a previous string, it's okay. */
|
||||
if (input == -2 && *last_search != '\0')
|
||||
return 0;
|
||||
@ -751,7 +742,6 @@ int filesearch_init(void)
|
||||
if (input < 0)
|
||||
statusbar(_("Cancelled"));
|
||||
|
||||
/* Zero is good; positive values mean some function was run. */
|
||||
return input;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user