From: Chris Hanson Date: Wed, 15 May 1996 00:04:34 +0000 (+0000) Subject: In SCREEN-MOVE-CURSOR, forget current position of cursor in order to X-Git-Tag: 20090517-FFI~5514 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fbae299213b099202d2c074b7b1fed1a3049b660;p=mit-scheme.git In SCREEN-MOVE-CURSOR, forget current position of cursor in order to force it to be moved at the end of the update. This works around bugs in the terminal implementations: sometimes the cursor is moved as a side-effect of some other operation. It's easier to fix this here than to modify each implementation to guarantee that the cursor is not moved. --- diff --git a/v7/src/edwin/screen.scm b/v7/src/edwin/screen.scm index 1f3d20dec..6c9d42130 100644 --- a/v7/src/edwin/screen.scm +++ b/v7/src/edwin/screen.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: screen.scm,v 1.111 1996/05/14 23:46:07 cph Exp $ +;;; $Id: screen.scm,v 1.112 1996/05/15 00:04:34 cph Exp $ ;;; ;;; Copyright (c) 1989-96 Massachusetts Institute of Technology ;;; @@ -293,7 +293,12 @@ ((screen-debug-trace screen) 'screen screen 'move-cursor x y)) (let ((new-matrix (screen-new-matrix screen))) (set-matrix-cursor-x! new-matrix x) - (set-matrix-cursor-y! new-matrix y))) + (set-matrix-cursor-y! new-matrix y)) + ;; Kludge: forget current position of cursor in order to force it to + ;; move. Works around side-effects in terminal that move cursor. + (let ((current-matrix (screen-current-matrix screen))) + (set-matrix-cursor-x! current-matrix #f) + (set-matrix-cursor-y! current-matrix #f))) (define (screen-direct-output-move-cursor screen x y) (if (screen-debug-trace screen)