texinfo-commits
[Top][All Lists]
Advanced

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

texinfo ChangeLog info/echo-area.c info/indices.c


From: Sergey Poznyakoff
Subject: texinfo ChangeLog info/echo-area.c info/indices.c
Date: Tue, 27 Dec 2011 20:27:22 +0000

CVSROOT:        /cvsroot/texinfo
Module name:    texinfo
Changes by:     Sergey Poznyakoff <gray>        11/12/27 20:27:22

Modified files:
        .              : ChangeLog 
        info           : echo-area.c indices.c 

Log message:
        Bugfixes.
                
        * info/echo-area.c (info_read_completing_internal): Initialize
        window line map before the loop, otherwise the previous contents
        is used to compute cursor position.
        * info/indices.c (info_virtual_index): Report and return
        immediately if there are no indices in the document.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/ChangeLog?cvsroot=texinfo&r1=1.1290&r2=1.1291
http://cvs.savannah.gnu.org/viewcvs/texinfo/info/echo-area.c?cvsroot=texinfo&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/texinfo/info/indices.c?cvsroot=texinfo&r1=1.17&r2=1.18

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.1290
retrieving revision 1.1291
diff -u -b -r1.1290 -r1.1291
--- ChangeLog   27 Dec 2011 19:34:16 -0000      1.1290
+++ ChangeLog   27 Dec 2011 20:27:21 -0000      1.1291
@@ -1,3 +1,13 @@
+2011-12-27  Sergey Poznyakoff  <address@hidden>
+
+       Bugfixes.
+       
+       * info/echo-area.c (info_read_completing_internal): Initialize
+       window line map before the loop, otherwise the previous contents
+       is used to compute cursor position.
+       * info/indices.c (info_virtual_index): Report and return
+       immediately if there are no indices in the document.
+
 2011-12-27  Karl Berry  <address@hidden>
 
        * NEWS: mention Info's virtual-index.

Index: info/echo-area.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/info/echo-area.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- info/echo-area.c    18 Oct 2011 18:47:19 -0000      1.17
+++ info/echo-area.c    27 Dec 2011 20:27:21 -0000      1.18
@@ -1,5 +1,5 @@
 /* echo-area.c -- how to read a line in the echo area.
-   $Id: echo-area.c,v 1.17 2011/10/18 18:47:19 karl Exp $
+   $Id: echo-area.c,v 1.18 2011/12/27 20:27:21 gray Exp $
 
    Copyright (C) 1993, 1997, 1998, 1999, 2001, 2004, 2007, 2008, 2011
    Free Software Foundation, Inc.
@@ -828,6 +828,7 @@
 
   active_window = the_echo_area;
   echo_area_is_active++;
+  window_line_map_init (active_window);
 
   /* Read characters in the echo area. */
   while (1)

Index: info/indices.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/info/indices.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- info/indices.c      17 Nov 2011 10:04:59 -0000      1.17
+++ info/indices.c      27 Dec 2011 20:27:22 -0000      1.18
@@ -1,5 +1,5 @@
 /* indices.c -- deal with an Info file index.
-   $Id: indices.c,v 1.17 2011/11/17 10:04:59 gray Exp $
+   $Id: indices.c,v 1.18 2011/12/27 20:27:22 gray Exp $
 
    Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003, 2004, 2007, 2008, 2011
    Free Software Foundation, Inc.
@@ -878,11 +878,26 @@
   int i;
   size_t cnt, off;
   
+  fb = file_buffer_of_window (window);
+
+  if (!initial_index_filename ||
+      !fb ||
+      (FILENAME_CMP (initial_index_filename, fb->filename) != 0))
+    {
+      info_free_references (index_index);
+      window_message_in_echo_area (_("Finding index entries..."));
+      index_index = info_indices_of_file_buffer (fb);
+    }
+
+  if (!index_index)
+    {
+      info_error (_("No index"));
+      return;
+    }
+    
   line = info_read_maybe_completing (window, _("Index topic: "),
                                     index_index);
 
-  window = active_window;
-
   /* User aborted? */
   if (!line)
     {
@@ -898,17 +913,6 @@
     }
   linelen = strlen (line);
   
-  fb = file_buffer_of_window (window);
-
-  if (!initial_index_filename ||
-      !fb ||
-      (FILENAME_CMP (initial_index_filename, fb->filename) != 0))
-    {
-      info_free_references (index_index);
-      window_message_in_echo_area (_("Finding index entries..."));
-      index_index = info_indices_of_file_buffer (fb);
-    }
-
   text_buffer_init (&text);
   text_buffer_printf (&text, _("Index for `%s'"), line);
   text_buffer_add_char (&text, 0);



reply via email to

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