From 44a3c2b1c0da4d375a7aa54f15c0a7a612067748 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 6 Nov 2005 16:30:58 +0000 Subject: [PATCH] Make sure that group point is updated when window point is changed. --- v7/src/edwin/bufwin.scm | 13 ++++++++----- v7/src/edwin/bufwiu.scm | 13 +++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/v7/src/edwin/bufwin.scm b/v7/src/edwin/bufwin.scm index 4c1b5cc01..85de37467 100644 --- a/v7/src/edwin/bufwin.scm +++ b/v7/src/edwin/bufwin.scm @@ -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) diff --git a/v7/src/edwin/bufwiu.scm b/v7/src/edwin/bufwiu.scm index 713468803..3d1fd261e 100644 --- a/v7/src/edwin/bufwiu.scm +++ b/v7/src/edwin/bufwiu.scm @@ -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)))))) ;;;; 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)))) -- 2.25.1