Fix minor bug in handling of cursor during SCREEN-FORCE-UPDATE.
authorChris Hanson <org/chris-hanson/cph>
Tue, 2 Jul 1996 21:01:15 +0000 (21:01 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 2 Jul 1996 21:01:15 +0000 (21:01 +0000)
v7/src/edwin/screen.scm

index 6c9d42130cc9521a94b83baf5e2351ec1942b159..e5b6fef57b53d28601ef574696252bf4d61c6783 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: screen.scm,v 1.112 1996/05/15 00:04:34 cph Exp $
+;;;    $Id: screen.scm,v 1.113 1996/07/02 21:01:15 cph Exp $
 ;;;
 ;;;    Copyright (c) 1989-96 Massachusetts Institute of Technology
 ;;;
        (string-fill! (vector-ref current-contents y) #\space)
        (boolean-vector-set! current-enable y true)
        (boolean-vector-set! current-hl-enable y false)))
-    (set-matrix-cursor-x! new-matrix (matrix-cursor-x current-matrix))
-    (set-matrix-cursor-y! new-matrix (matrix-cursor-y current-matrix))
-    (set-matrix-cursor-x! current-matrix #f)
-    (set-matrix-cursor-y! current-matrix #f))
+    (if (or (matrix-cursor-x current-matrix)
+           (matrix-cursor-y current-matrix))
+       (begin
+         (set-matrix-cursor-x! new-matrix (matrix-cursor-x current-matrix))
+         (set-matrix-cursor-y! new-matrix (matrix-cursor-y current-matrix))
+         (set-matrix-cursor-x! current-matrix #f)
+         (set-matrix-cursor-y! current-matrix #f))))
   (set-screen-needs-update?! screen true))
 \f
 (define (screen-scroll-lines-down screen xl xu yl yu amount)