texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[6188] info index search fix


From: Gavin D. Smith
Subject: [6188] info index search fix
Date: Sat, 14 Mar 2015 15:13:41 +0000

Revision: 6188
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6188
Author:   gavin
Date:     2015-03-14 15:13:39 +0000 (Sat, 14 Mar 2015)
Log Message:
-----------
info index search fix

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/indices.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-03-13 22:09:26 UTC (rev 6187)
+++ trunk/ChangeLog     2015-03-14 15:13:39 UTC (rev 6188)
@@ -1,3 +1,8 @@
+2015-03-14  Gavin Smith  <address@hidden>
+
+       * info/indices.c (next_index_match) <substring search>: Find 
+       non-case-matching initial matches.
+
 2015-03-13  Gavin Smith  <address@hidden>
 
        * info/indices.c (index_initial): New variable.

Modified: trunk/info/indices.c
===================================================================
--- trunk/info/indices.c        2015-03-13 22:09:26 UTC (rev 6187)
+++ trunk/info/indices.c        2015-03-14 15:13:39 UTC (rev 6188)
@@ -367,16 +367,17 @@
 
   if (index_partial)
     {
-      /* Looking for substrings, not returning previous matches. */
+      /* Look for substrings, excluding case-matching inital matches. */
       for (i = offset + dir; i > -1 && index_index[i]; i += dir)
         {
-          if (!index_index[i]->label[0])
-            continue;
-          partial_match = string_in_line (string, index_index[i]->label + 1);
-          if (partial_match != -1)
+          if (strncmp (index_index[i]->label, string, search_len) != 0)
             {
-              *match_offset = partial_match + 1;
-              break;
+              partial_match = string_in_line (string, index_index[i]->label);
+              if (partial_match != -1)
+                {
+                  *match_offset = partial_match + 1;
+                  break;
+                }
             }
         }
       if (partial_match <= 0)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]