Update of /project/climacs/cvsroot/climacs In directory common-lisp.net:/tmp/cvs-serv17603
Modified Files: gui.lisp pane.lisp Log Message: Patch from John Q Splittist making the behavior of points in panes more natural.
Date: Mon May 9 16:47:45 2005 Author: rstrandh
Index: climacs/gui.lisp diff -u climacs/gui.lisp:1.136 climacs/gui.lisp:1.137 --- climacs/gui.lisp:1.136 Mon May 9 16:13:44 2005 +++ climacs/gui.lisp Mon May 9 16:47:45 2005 @@ -704,6 +704,7 @@ :prompt "Find File")) (buffer (make-instance 'climacs-buffer)) (pane (current-window))) + (setf (point (buffer pane)) (clone-mark (point pane))) (push buffer (buffers *application-frame*)) (setf (buffer (current-window)) buffer) (setf (syntax buffer) (make-instance @@ -787,6 +788,7 @@ (let ((buffer (accept 'buffer :prompt "Switch to buffer")) (pane (current-window))) + (setf (point (buffer pane)) (clone-mark (point pane))) (setf (buffer pane) buffer) (full-redisplay pane)))
@@ -966,7 +968,8 @@ (multiple-value-bind (vbox new-pane) (make-pane-constellation) (let* ((current-window (current-window)) (constellation-root (parent3 current-window))) - (setf (buffer new-pane) (buffer current-window) + (setf (point (buffer current-window)) (clone-mark (point current-window)) + (buffer new-pane) (buffer current-window) (auto-fill-mode new-pane) (auto-fill-mode current-window) (auto-fill-column new-pane) (auto-fill-column current-window)) (push new-pane (windows *application-frame*)) @@ -980,7 +983,8 @@ (multiple-value-bind (vbox new-pane) (make-pane-constellation) (let* ((current-window (current-window)) (constellation-root (parent3 current-window))) - (setf (buffer new-pane) (buffer current-window) + (setf (point (buffer current-window)) (clone-mark (point current-window)) + (buffer new-pane) (buffer current-window) (auto-fill-mode new-pane) (auto-fill-mode current-window) (auto-fill-column new-pane) (auto-fill-column current-window)) (push new-pane (windows *application-frame*))
Index: climacs/pane.lisp diff -u climacs/pane.lisp:1.25 climacs/pane.lisp:1.26 --- climacs/pane.lisp:1.25 Sat May 7 00:32:28 2005 +++ climacs/pane.lisp Mon May 9 16:47:45 2005 @@ -196,6 +196,7 @@ (defclass climacs-buffer (delegating-buffer filepath-mixin name-mixin) ((needs-saving :initform nil :accessor needs-saving) (syntax :accessor syntax) + (point :initform nil :initarg :point :accessor point) (indent-tabs-mode :initarg indent-tabs-mode :initform t :accessor indent-tabs-mode)) (:default-initargs @@ -204,13 +205,14 @@
(defmethod initialize-instance :after ((buffer climacs-buffer) &rest args) (declare (ignore args)) - (with-slots (syntax) buffer + (with-slots (syntax point) buffer (setf syntax (make-instance - 'basic-syntax :buffer (implementation buffer))))) + 'basic-syntax :buffer (implementation buffer)) + point (clone-mark (low-mark buffer) :right))))
(defclass climacs-pane (application-pane) ((buffer :initform (make-instance 'climacs-buffer) :accessor buffer) - (point :initform nil :initarg :point :reader point) + (point :initform nil :initarg :point :accessor point) (mark :initform nil :initarg :mark :accessor mark) (top :reader top) (bot :reader bot) @@ -240,6 +242,7 @@ (defmethod initialize-instance :after ((pane climacs-pane) &rest args) (declare (ignore args)) (with-slots (buffer point mark) pane + (setf point (clone-mark (point buffer))) (when (null point) (setf point (clone-mark (low-mark buffer) :right))) (when (null mark) @@ -256,7 +259,7 @@
(defmethod (setf buffer) :after (buffer (pane climacs-pane)) (with-slots (point mark top bot) pane - (setf point (clone-mark (low-mark buffer) :right) + (setf point (clone-mark (point buffer)) mark (clone-mark (low-mark buffer) :right) top (clone-mark (low-mark buffer) :left) bot (clone-mark (high-mark buffer) :right))))