Fix crufty problem with highlighting -- indentation was highlighted
authorChris Hanson <org/chris-hanson/cph>
Tue, 26 Oct 1993 01:12:23 +0000 (01:12 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 26 Oct 1993 01:12:23 +0000 (01:12 +0000)
instead of text!

v7/src/edwin/debug.scm

index bf5c61664a57488501fb1637a78375c10ed848ba..9e961e2bba505b39c742b0d25429a92297b45bfd 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: debug.scm,v 1.23 1993/10/26 00:37:57 cph Exp $
+;;;    $Id: debug.scm,v 1.24 1993/10/26 01:12:23 cph Exp $
 ;;;
 ;;;    Copyright (c) 1992-93 Massachusetts Institute of Technology
 ;;;
 
 (define (highlight-region-excluding-indentation start end)
   (let loop ((start start))
-    (let ((lend (line-end start 0)))
+    (let ((start (horizontal-space-end start))
+         (lend (line-end start 0)))
       (if (mark<= lend end)
          (begin
-           (highlight-region (horizontal-space-region start) #t)
+           (let ((end (horizontal-space-start lend)))
+             (if (mark< start end)
+                 (highlight-region (make-region start end) #t)))
            (loop (mark1+ lend)))
-         (let ((start (horizontal-space-end start))
-               (end (horizontal-space-start end)))
+         (let ((end (horizontal-space-start end)))
            (if (mark< start end)
                (highlight-region (make-region start end) #t)))))))
 \f