From ea5b814ce65b8b70b02e0b65c88df8cb6b8aa6c6 Mon Sep 17 00:00:00 2001 From: Jason Wilson Date: Fri, 13 Aug 1993 01:56:57 +0000 Subject: [PATCH] Fix fencepost error in highlighting of subexpressions. --- v7/src/edwin/debug.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/v7/src/edwin/debug.scm b/v7/src/edwin/debug.scm index 4c8703215..8814d9463 100644 --- a/v7/src/edwin/debug.scm +++ b/v7/src/edwin/debug.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: debug.scm,v 1.8 1993/08/13 01:22:17 jbank Exp $ +;;; $Id: debug.scm,v 1.9 1993/08/13 01:56:57 jawilson Exp $ ;;; ;;; Copyright (c) 1992-93 Massachusetts Institute of Technology ;;; @@ -116,10 +116,14 @@ (highlight-region (horizontal-space-end start) (horizontal-space-start lend)) (loop (mark1+ lend))) - (highlight-region (horizontal-space-end start) - (horizontal-space-start end)))))) + (let ((start (horizontal-space-end start)) + (end (horizontal-space-start end))) + (if (mark< start end) + (highlight-region start end))))))) (define (highlight-region start end) + (if (not (mark<= start end)) + (error "Marks incorrectly related:" start end)) (group-highlight (mark-group start) (mark-index start) (mark-index end))) (define (group-highlight group start end) -- 2.25.1