texinfo-commits
[Top][All Lists]
Advanced

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

texinfo update (Sun Nov 25 14:53:01 EST 2007)


From: Karl Berry
Subject: texinfo update (Sun Nov 25 14:53:01 EST 2007)
Date: Sun, 25 Nov 2007 14:53:03 -0500

Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.779
retrieving revision 1.780
diff -u -r1.779 -r1.780
--- ChangeLog   23 Nov 2007 22:16:21 -0000      1.779
+++ ChangeLog   25 Nov 2007 19:25:34 -0000      1.780
@@ -1,3 +1,8 @@
+2007-11-25  Stephane Chazelas  <address@hidden>
+
+       *  info/indices.c (info_next_index_match): use the line number
+       specified in the index entry, if available.
+
 2007-11-23  Benno Schulenberg <address@hidden>
 
        * info/infodoc.c: keep help strings together for translation.
Index: info/indices.c
===================================================================
RCS file: /sources/texinfo/texinfo/info/indices.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- info/indices.c      1 Jul 2007 21:20:30 -0000       1.8
+++ info/indices.c      25 Nov 2007 19:25:34 -0000      1.9
@@ -1,5 +1,5 @@
 /* indices.c -- deal with an Info file index.
-   $Id: indices.c,v 1.8 2007/07/01 21:20:30 karl Exp $
+   $Id: indices.c,v 1.9 2007/11/25 19:25:34 karl Exp $
 
    Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003, 2004, 2007
    Free Software Foundation, Inc.
@@ -439,12 +439,21 @@
 
   info_set_node_of_window (1, window, node);
 
-  /* Try to find an occurence of LABEL in this node. */
   {
-    long start, loc;
+    long loc;
+    long line = index_index[i]->line_number - 1;
 
-    start = window->line_starts[1] - window->node->contents;
-    loc = info_target_search_node (node, index_index[i]->label, start);
+    if (line >= 0 && line < window->line_count)
+      {
+       /* Jump to the line number specified in the index entry.  */
+       loc = window->line_starts[line] - window->node->contents;
+      }
+    else
+      {
+       /* Try to find an occurence of LABEL in this node. */
+       long start = window->line_starts[1] - window->node->contents;
+       loc = info_target_search_node (node, index_index[i]->label, start);
+      }
 
     if (loc != -1)
       {
P ChangeLog
P info/indices.c




reply via email to

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