]> git.wh0rd.org Git - nano.git/commitdiff
Consistently using the appropriate variable in the appropriate function.
authorBenno Schulenberg <bensberg@justemail.net>
Tue, 7 Apr 2015 08:44:24 +0000 (08:44 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Tue, 7 Apr 2015 08:44:24 +0000 (08:44 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5179 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/search.c

index 9b718b210a3afb687e58cda063553c9c4bdaa4c7..acd6e06cdf4ee29b5aee7de1d2407c60affeca05 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
        when nothing was sought yet (when historylog is set).
        * src/browser.c (filesearch_init): Remove an unfitting comment
        (there are no toggles here) and tweak some others.
+       * src/search.c (do_search, do_research): Use the same variable as
+       in the surrounding code, for consistency.
 
 2015-04-05  Benno Schulenberg  <bensberg@justemail.net>
        * doc/texinfo/nano.texi: Expand on nano's features, condense the
index a1e2bb3b3516b22b793e4f93675f3cf22c41aea3..4deca0b3dc9cce8befc1353dd4f99327915b537c 100644 (file)
@@ -490,7 +490,7 @@ void do_search(void)
         * back at the same position if the string isn't found again, in
         * which case it's the only occurrence. */
        if (ISSET(USE_REGEXP) && regexp_bol_or_eol(&search_regexp,
-               last_search)) {
+               answer)) {
            didfind = findnextstr(
 #ifndef DISABLE_SPELLER
                FALSE,
@@ -556,7 +556,7 @@ void do_research(void)
                        FALSE,
 #endif
                        TRUE, openfile->current, openfile->current_x,
-                       answer, NULL);
+                       last_search, NULL);
                if (fileptr == openfile->current && fileptr_x ==
                        openfile->current_x && !didfind)
                    statusbar(_("This is the only occurrence"));