[climacs-cvs] CVS climacs

thenriksen thenriksen at common-lisp.net
Fri Dec 28 15:39:49 UTC 2007


Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv12985

Modified Files:
	core.lisp 
Log Message:
Fixed finding of files while the current window is a typeout pane.


--- /project/climacs/cvsroot/climacs/core.lisp	2007/12/13 19:28:16	1.20
+++ /project/climacs/cvsroot/climacs/core.lisp	2007/12/28 15:39:49	1.21
@@ -331,22 +331,27 @@
                    (return-from find-file-impl nil)))
                (let* ((buffer (if (probe-file filepath)
                                   (with-open-file (stream filepath :direction :input)
-                                                  (make-buffer-from-stream stream))
-                                (make-new-buffer)))
+                                    (make-buffer-from-stream stream))
+                                  (make-new-buffer)))
                       (view (make-new-view-for-climacs
                              *esa-instance* 'textual-drei-syntax-view
                              :name (filepath-filename filepath)
                              :buffer buffer)))
+                 (unless (buffer-pane-p (current-window))
+                   (other-window (or (find-if #'(lambda (window)
+                                                  (typep window 'climacs-pane))
+                                              (windows *esa-instance*))
+                                     (split-window t))))
                  (setf (offset (point buffer)) (offset (point view))
-                       (current-view) view
                        (syntax view) (make-syntax-for-view view (syntax-class-name-for-filepath filepath))
                        (file-write-time buffer) (file-write-date filepath)
                        (needs-saving buffer) nil
                        (name buffer) (filepath-filename filepath))
+                 (setf (current-view (current-window)) view)
                  (evaluate-attribute-line view)
                  (setf (filepath buffer) filepath
                        (read-only-p buffer) readonlyp)
-                 (beginning-of-buffer (point))
+                 (beginning-of-buffer (point view))
                  buffer)))))))
 
 (defmethod frame-find-file ((application-frame climacs) filepath)




More information about the Climacs-cvs mailing list