[climacs-cvs] CVS update: climacs/syntax.lisp

Robert Strandh rstrandh at common-lisp.net
Wed Dec 29 11:38:37 UTC 2004


Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv579

Modified Files:
	syntax.lisp 
Log Message:
Fixed the invisible cursor problem.

Still don't know why even positions are required, though.

Date: Wed Dec 29 12:38:34 2004
Author: rstrandh

Index: climacs/syntax.lisp
diff -u climacs/syntax.lisp:1.11 climacs/syntax.lisp:1.12
--- climacs/syntax.lisp:1.11	Tue Dec 28 23:41:14 2004
+++ climacs/syntax.lisp	Wed Dec 29 12:38:34 2004
@@ -122,6 +122,11 @@
 	       finally (output-word (terpri pane))
 		       (incf scan))))))
 
+(defun round-up (x)
+  (cond ((zerop x) 2)
+	((evenp x) x)
+	(t (1+ x))))
+
 (defmethod redisplay-with-syntax (pane (syntax basic-syntax))
   (let* ((medium (sheet-medium pane))
 	 (style (medium-text-style medium))
@@ -168,8 +173,9 @@
 	      (draw-line* pane
 			  ;; cursors with odd x-positions were invisible
 			  ;; so we strip off the low bit to make them even.
-			  (logand -2 cursor-x) (- cursor-y (* 0.2 height))
-			  (logand -2 cursor-x) (+ cursor-y (* 0.8 height))
+			  
+			  (round-up cursor-x) (- cursor-y (* 0.2 height))
+			  (round-up cursor-x) (+ cursor-y (* 0.8 height))
 			  :ink +red+)))))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




More information about the Climacs-cvs mailing list