texinfo-commits
[Top][All Lists]
Advanced

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

[5804] goal column for keeping point in window


From: Gavin D. Smith
Subject: [5804] goal column for keeping point in window
Date: Sun, 07 Sep 2014 17:01:18 +0000

Revision: 5804
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5804
Author:   gavin
Date:     2014-09-07 17:01:10 +0000 (Sun, 07 Sep 2014)
Log Message:
-----------
goal column for keeping point in window

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-09-07 16:41:34 UTC (rev 5803)
+++ trunk/ChangeLog     2014-09-07 17:01:10 UTC (rev 5804)
@@ -1,5 +1,10 @@
 2014-09-07  Gavin Smith  <address@hidden>
 
+       * info/window.c (set_window_pagetop): Set goal column as well as point
+       when moving point into displayed part of node.
+
+2014-09-07  Gavin Smith  <address@hidden>
+
        * info/session.c (info_clear_search): New user command.
        * doc/info-stnd.texi (Searching Commands): Document it.
 

Modified: trunk/info/window.c
===================================================================
--- trunk/info/window.c 2014-09-07 16:41:34 UTC (rev 5803)
+++ trunk/info/window.c 2014-09-07 17:01:10 UTC (rev 5804)
@@ -778,9 +778,16 @@
   /* Make sure that point appears in this window. */
   point_line = window_line_of_point (window);
   if (point_line < window->pagetop)
-    window->point = window->line_starts[window->pagetop];
+    {
+      window->point = window->line_starts[window->pagetop];
+      window->goal_column = 0;
+    }
   else if (point_line >= window->pagetop + window->height)
-    window->point = window->line_starts[window->pagetop + window->height - 1];
+    {
+      long bottom = window->pagetop + window->height - 1;
+      window->point = window->line_starts[bottom];
+      window->goal_column = 0;
+    }
 
   window->flags |= W_UpdateWindow;
 




reply via email to

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