texinfo-commits
[Top][All Lists]
Advanced

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

[6208] window history for file structure traversal


From: Gavin D. Smith
Subject: [6208] window history for file structure traversal
Date: Tue, 07 Apr 2015 10:14:20 +0000

Revision: 6208
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6208
Author:   gavin
Date:     2015-04-07 10:14:19 +0000 (Tue, 07 Apr 2015)
Log Message:
-----------
window history for file structure traversal

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-04-07 09:48:14 UTC (rev 6207)
+++ trunk/ChangeLog     2015-04-07 10:14:19 UTC (rev 6208)
@@ -1,5 +1,14 @@
 2015-04-07  Gavin Smith  <address@hidden>
 
+       * info/session.c (forward_move_node_structure) <Up and Next>,
+       (backward_move_node_structure) <Prev and down>: Clean up window
+       history so to add only one node in history.  Report from Benno 
+       Schulenberg.
+       (backward_move_node_structure): Case-insensitive check for name 
+       of (dir).
+
+2015-04-07  Gavin Smith  <address@hidden>
+
        * util/texi2dvi: Comments changed.
 
 2015-04-06  Sergey Poznyakoff  <address@hidden>

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2015-04-07 09:48:14 UTC (rev 6207)
+++ trunk/info/session.c        2015-04-07 10:14:19 UTC (rev 6208)
@@ -3011,6 +3011,7 @@
            are no more nodes. */
         {
           int up_counter;
+          int starting_hist_index = window->hist_index;
 
           /* Back up through the "Up:" pointers until we have found a "Next:"
              that isn't the same as the first menu item found in that node. */
@@ -3039,6 +3040,11 @@
                   /* This node has a "Next" pointer, and it is not the
                      same as the first menu item found in this node. */
                   info_handle_pointer ("Next", window);
+
+                  /* Don't include intermediate nodes in the window's
+                     history.  */
+                  cleanup_history (window, starting_hist_index,
+                                   window->hist_index - 1);
                   return 0;
                 }
               else
@@ -3096,8 +3102,7 @@
         {
           /* If up is the dir node, we are at the top node.
              Don't do anything. */
-          if (   !strcmp ("(dir)", window->node->up)
-              || !strcmp ("(DIR)", window->node->up))
+          if (!strncasecmp (window->node->up, "(dir)", strlen ("(dir)")))
             {
               info_error ("%s", 
                     _("No 'Prev' or 'Up' for this node within this 
document."));
@@ -3114,6 +3119,7 @@
              in the menus as far as possible. */
           else if (window->node->prev)
             {
+              int starting_hist_index = window->hist_index;
               info_handle_pointer ("Prev", window);
               if (!(window->node->flags & N_IsIndex))
                 {
@@ -3125,6 +3131,10 @@
                       if (!info_select_reference (window, entry))
                         break;
                     }
+                  /* Don't include intermediate nodes in the window's
+                     history.  */
+                  cleanup_history (window, starting_hist_index,
+                                   window->hist_index - 1);
                 }
             }
           else /* 'Up' but no 'Prev' */




reply via email to

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