texinfo-commits
[Top][All Lists]
Advanced

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

[5635] set_remembered_pagetop_and_point merged


From: Gavin D. Smith
Subject: [5635] set_remembered_pagetop_and_point merged
Date: Tue, 03 Jun 2014 16:23:28 +0000

Revision: 5635
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5635
Author:   gavin
Date:     2014-06-03 16:23:27 +0000 (Tue, 03 Jun 2014)
Log Message:
-----------
set_remembered_pagetop_and_point merged

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-06-03 15:55:10 UTC (rev 5634)
+++ trunk/ChangeLog     2014-06-03 16:23:27 UTC (rev 5635)
@@ -1,5 +1,14 @@
 2014-06-03  Gavin Smith  <address@hidden>
 
+       * info/session.c (info_search_in_node_internal, info_search_internal):
+       Replace calls to set_remembered_pagetop_and_point,
+       window_set_node_of_window and remember_window_and_node with call to
+       info_set_node_of_window.
+       (set_remembered_pagetop_and_point): Merged into
+       info_set_node_of_window.
+
+2014-06-03  Gavin Smith  <address@hidden>
+
        * info/footnotes.c (info_get_or_remove_footnotes): Call
        info_set_node_of_window instead of window_set_node_of_window.
        * info/session.c (remember_window_and_node): Declared static.

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-06-03 15:55:10 UTC (rev 5634)
+++ trunk/info/session.c        2014-06-03 16:23:27 UTC (rev 5635)
@@ -307,19 +307,6 @@
 /*                                                                  */
 /* **************************************************************** */
 
-/* Reset the remembered pagetop and point of WINDOW to WINDOW's current
-   values if the window and node are the same as the current one being
-   displayed. */
-static void
-set_remembered_pagetop_and_point (WINDOW *win)
-{
-  if (win->hist_index && win->hist[win->hist_index - 1]->node == win->node)
-    {
-      win->hist[win->hist_index - 1]->pagetop = win->pagetop;
-      win->hist[win->hist_index - 1]->point = win->point;
-    }
-}
-
 /* Remember this node, the currently displayed pagetop, and the current
    location of point in this window. */
 static void
@@ -372,7 +359,13 @@
 void
 info_set_node_of_window (WINDOW *window, NODE *node)
 {
-  set_remembered_pagetop_and_point (window);
+  /* Remember the current values of pagetop and point if the remembered node
+     is the same as the current one being displayed. */
+  if (win->hist_index && win->hist[win->hist_index - 1]->node == win->node)
+    {
+      win->hist[win->hist_index - 1]->pagetop = win->pagetop;
+      win->hist[win->hist_index - 1]->point = win->point;
+    }
 
   /* Put this node into the window. */
   window_set_node_of_window (window, node);
@@ -3357,9 +3350,8 @@
   
   if (result == search_success && window)
     {
-      set_remembered_pagetop_and_point (window);
       if (window->node != node)
-        window_set_node_of_window (window, node);
+        info_set_node_of_window (window, node);
       window->point = *poff;
       window_adjust_pagetop (window);
     }
@@ -3574,7 +3566,6 @@
           if (result == search_success)
             {
               /* Yes!  We win. */
-              remember_window_and_node (window);
               if (!echo_area_is_active)
                {
                  if (msg)




reply via email to

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