]> git.wh0rd.org Git - nano.git/commitdiff
Not searching for the empty string when nothing was sought yet
authorBenno Schulenberg <bensberg@justemail.net>
Tue, 7 Apr 2015 08:19:04 +0000 (08:19 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Tue, 7 Apr 2015 08:19:04 +0000 (08:19 +0000)
in the file browser (when historylig is set).

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5177 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/browser.c

index 40a5b3452ddf2e901a687d4e1ad4fee7f5223ddb..7bc2053392b3b05c6ab8dbc669cccad54a5303cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-07  Benno Schulenberg  <bensberg@justemail.net>
+       * src/browser.c (do_fileresearch): Don't search for the empty string
+       when nothing was sought yet (when historylog is set).
+
 2015-04-05  Benno Schulenberg  <bensberg@justemail.net>
        * doc/texinfo/nano.texi: Expand on nano's features, condense the
        synopsis, and "online" means something else to most people.
index 12716a03189e2d706402ae93bb1cb924e1315795..b967854dd245cdec3f5653e435482790dc91e061 100644 (file)
@@ -898,7 +898,7 @@ void do_fileresearch(void)
 
     if (last_search[0] != '\0') {
        findnextfile_wrap_reset();
-       didfind = findnextfile(FALSE, begin, answer);
+       didfind = findnextfile(FALSE, begin, last_search);
 
        /* Check to see if there's only one occurrence of the string and
         * we're on it now. */
@@ -907,7 +907,7 @@ void do_fileresearch(void)
             * should only end up back at the same position if the
             * string isn't found again, in which case it's the only
             * occurrence. */
-           didfind = findnextfile(TRUE, begin, answer);
+           didfind = findnextfile(TRUE, begin, last_search);
            if (selected == begin && !didfind)
                statusbar(_("This is the only occurrence"));
        }