Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv28101
Modified Files:
pane.lisp
Log Message:
Added method to fix problems with the viewport after resizing,
and added it to the redisplay function.
Ideally, it should only be called on resizes leading to the
problem, so I'll keep looking for better solutions.
Date: Mon Dec 5 10:55:18 2005
Author: dholman
Index: climacs/pane.lisp
diff -u climacs/pane.lisp:1.33 climacs/pane.lisp:1.34
--- climacs/pane.lisp:1.33 Tue Sep 13 21:23:59 2005
+++ climacs/pane.lisp Mon Dec 5 10:55:18 2005
@@ -527,6 +527,16 @@
(setf cursor-x x
cursor-y y)))))
+(defgeneric fix-pane-viewport (pane))
+
+(defmethod fix-pane-viewport ((pane climacs-pane))
+ (let* ((v (window-viewport pane))
+ (x (rectangle-width v))
+ (y (rectangle-height v)))
+ (resize-sheet pane x y)
+ (setf (window-viewport-position pane) (values 0 0))))
+
+
(defmethod redisplay-pane-with-syntax ((pane climacs-pane) (syntax basic-syntax) current-p)
(display-cache pane)
(when (mark-visible-p pane) (display-mark pane syntax))
@@ -541,8 +551,10 @@
(setf (full-redisplay-p pane) nil))
(adjust-cache pane))
(fill-cache pane)
+ (fix-pane-viewport pane)
(update-syntax-for-display (buffer pane) (syntax (buffer pane)) (top pane) (bot pane))
(redisplay-pane-with-syntax pane (syntax (buffer pane)) current-p))
+
(defgeneric full-redisplay (pane))