Make sure that group point is updated when window point is changed.
authorChris Hanson <org/chris-hanson/cph>
Sun, 6 Nov 2005 16:30:58 +0000 (16:30 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 6 Nov 2005 16:30:58 +0000 (16:30 +0000)
v7/src/edwin/bufwin.scm
v7/src/edwin/bufwiu.scm

index 4c1b5cc0132afe84b10091f07d2d474088e92165..85de3746761f2432b8e4a7085ba0deb83c29321c 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: bufwin.scm,v 1.314 2005/11/06 16:16:55 cph Exp $
+$Id: bufwin.scm,v 1.315 2005/11/06 16:30:54 cph Exp $
 
 Copyright 1987,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
 Copyright 1994,1995,1996,1999,2000,2002 Massachusetts Institute of Technology
@@ -239,6 +239,10 @@ USA.
                                                 index
                                                 #t)))))
 
+(define (set-window-point-index! window index)
+  (%set-window-point-index! window index)
+  (%set-buffer-point-index! (%window-buffer window) index))
+
 (define-integrable (%window-cursor-inferior window)
   (with-instance-variables buffer-window window () cursor-inferior))
 
@@ -915,9 +919,8 @@ USA.
     (if (%window-debug-trace window)
        ((%window-debug-trace window) 'window window 'set-point! mark))
     (let ((mask (set-interrupt-enables! interrupt-mask/gc-ok)))
-      (%set-window-point-index! window (mark-index mark))
+      (set-window-point-index! window (mark-index mark))
       (%set-window-point-moved?! window 'SINCE-START-SET)
-      (%set-buffer-point! (%window-buffer window) mark)
       (window-needs-redisplay! window)
       (set-interrupt-enables! mask)
       unspecific)))
@@ -993,7 +996,7 @@ This number is a percentage, where 0 is the window's top and 100 the bottom."
               unspecific))
            (point-y
             (let ((mask (set-interrupt-enables! interrupt-mask/gc-ok)))
-              (%set-window-point-index!
+              (set-window-point-index!
                window
                (or (predict-index window start y-start
                                   (vector-ref cws 4) point-y)
@@ -1242,7 +1245,7 @@ If this is zero, point is always centered after it moves off screen."
        (begin
          (if point-not-visible-error?
              (error "point not visible at end of redisplay"))
-         (%set-window-point-index!
+         (set-window-point-index!
           window
           (or (predict-index window
                              (%window-start-line-index window)
index 7134688033e1dddea45ebad51b9c2e471aafb597..3d1fd261e5749eac55eea08226c0fbe4b3f84802 100644 (file)
@@ -1,8 +1,9 @@
 #| -*-Scheme-*-
 
-$Id: bufwiu.scm,v 1.37 2003/02/14 18:28:11 cph Exp $
+$Id: bufwiu.scm,v 1.38 2005/11/06 16:30:58 cph Exp $
 
-Copyright 1986, 1989-2000 Massachusetts Institute of Technology
+Copyright 1987,1989,1990,1991,1993,1994 Massachusetts Institute of Technology
+Copyright 1996,2000,2005 Massachusetts Institute of Technology
 
 This file is part of MIT/GNU Scheme.
 
@@ -128,10 +129,10 @@ USA.
          (window-needs-redisplay! window)))
     (let ((point (%window-point-index window)))
       (cond ((fix:< point start)
-            (%set-window-point-index! window start)
+            (set-window-point-index! window start)
             (%set-window-point-moved?! window 'SINCE-START-SET))
            ((fix:< end point)
-            (%set-window-point-index! window end)
+            (set-window-point-index! window end)
             (%set-window-point-moved?! window 'SINCE-START-SET))))))
 \f
 ;;;; Update
@@ -407,7 +408,7 @@ USA.
       ((%window-debug-trace window) 'window window
                                    'direct-output-forward-char!))
   (let ((mask (set-interrupt-enables! interrupt-mask/gc-ok)))
-    (%set-window-point-index! window (fix:+ (%window-point-index window) 1))
+    (set-window-point-index! window (fix:+ (%window-point-index window) 1))
     (let ((x-start
           (fix:+ (inferior-x-start (%window-cursor-inferior window)) 1))
          (y-start (inferior-y-start (%window-cursor-inferior window))))
@@ -424,7 +425,7 @@ USA.
       ((%window-debug-trace window) 'window window
                                    'direct-output-backward-char!))
   (let ((mask (set-interrupt-enables! interrupt-mask/gc-ok)))
-    (%set-window-point-index! window (fix:- (%window-point-index window) 1))
+    (set-window-point-index! window (fix:- (%window-point-index window) 1))
     (let ((x-start
           (fix:- (inferior-x-start (%window-cursor-inferior window)) 1))
          (y-start (inferior-y-start (%window-cursor-inferior window))))