From 584086394640a0d85b4be6c4717932550808821e Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 17 May 1991 19:11:32 +0000 Subject: [PATCH] Add check to WINDOW-MARK-VISIBLE? to handle marks that fall outside the display clipping limits. --- v7/src/edwin/bufwmc.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/v7/src/edwin/bufwmc.scm b/v7/src/edwin/bufwmc.scm index 646a71d1f..3c5ca8da3 100644 --- a/v7/src/edwin/bufwmc.scm +++ b/v7/src/edwin/bufwmc.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/bufwmc.scm,v 1.13 1991/04/02 19:55:33 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/bufwmc.scm,v 1.14 1991/05/17 19:11:32 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-91 Massachusetts Institute of Technology ;;; @@ -114,10 +114,12 @@ (define (buffer-window/mark-visible? window mark) ;; True iff cursor at this position would be on-screen. (let ((index (mark-index mark))) - (with-values (lambda () (start-point-for-index window index)) - (lambda (start-index start-y line-start-index) - line-start-index - (predict-index-visible? window start-index start-y index))))) + (and (fix:<= (%window-group-start-index window) index) + (fix:<= index (%window-group-end-index window)) + (with-values (lambda () (start-point-for-index window index)) + (lambda (start-index start-y line-start-index) + line-start-index + (predict-index-visible? window start-index start-y index)))))) (define (start-point-for-index window index) (if (outlines-valid? window) -- 2.25.1