[Openmcl-cvs-notifications] r16188 - in /release/1.10/source: ./ cocoa-ide/cocoa-editor.lisp cocoa-ide/cocoa-listener.lisp

rme at clozure.com rme at clozure.com
Thu Sep 4 16:34:54 UTC 2014


Author: rme
Date: Thu Sep  4 16:34:54 2014
New Revision: 16188

Log:
Merge from trunk.  Closes ticket:1151.

Modified:
    release/1.10/source/   (props changed)
    release/1.10/source/cocoa-ide/cocoa-editor.lisp
    release/1.10/source/cocoa-ide/cocoa-listener.lisp

Propchange: release/1.10/source/
---------------------------------------------------------------------------=
---
--- svn:mergeinfo	(original)
+++ svn:mergeinfo	Thu Sep  4 16:34:54 2014
@@ -4,4 +4,4 @@
 /branches/rme-logops:13875-13886
 /branches/working-0711/ccl:7970-13192,13197-13198,13202,13208,13214,13235-=
13236,13239,13263,13277-13278,13290,13293-13294,13302-13306,13331-13332,133=
39,13361-13364,13379,13383,13386,13388,13409,13435-13436,13438,13440-13442,=
13460-13461,13465,13467,13476,13487,13490,13492-13493,13502-13528,13545-135=
47,13549,13557-13558
 /release/1.5/source:13667
-/trunk/source:16167,16171,16173,16176-16177,16181-16182,16185
+/trunk/source:16167,16171,16173,16176-16177,16181-16182,16184-16185

Modified: release/1.10/source/cocoa-ide/cocoa-editor.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- release/1.10/source/cocoa-ide/cocoa-editor.lisp	(original)
+++ release/1.10/source/cocoa-ide/cocoa-editor.lisp	Thu Sep  4 16:34:54 2014
@@ -2544,6 +2544,30 @@
   ((sequence :foreign-type :int))
   (:metaclass ns:+ns-object))
 =

+;;; In certain cases, an NSTextView's selection changes without going
+;;; through setSelectedRange: or similar methods.  In post-10.6
+;;; systems, one of these cases is the find panel.  Synch up the
+;;; selections between the NSTextView and the Hemlock buffer here.
+(objc:defmethod (#/textViewDidChangeSelection: :void)
+    ((self hemlock-editor-window-controller) notification)
+  (let* ((hv (hemlock-view self))
+	 (buffer (hi:hemlock-view-buffer hv))
+	 (tv (#/object notification)))
+    (with-view-selection-info (tv buffer)
+      (let* ((range (#/selectedRange tv))
+	     (v0 (ns:ns-range-location range))
+	     (v1 (+ v0 (ns:ns-range-length range))))
+	(multiple-value-bind (b0 b1) (hi:buffer-selection-range buffer)
+	  ;; If the selections differ, synch them up.
+	  (unless (and (=3D b0 v0)
+		       (=3D b1 v1))
+	    (let ((point (hi:buffer-point buffer)))
+	      (hi:move-to-absolute-position point v0)
+	      (when (> v1 v0)
+		(let ((mark (hi:copy-mark point :right-inserting)))
+		  (hi:move-to-absolute-position mark v1)
+		  (hemlock::%buffer-push-buffer-mark buffer mark t))))))))))
+
 (objc:defmethod #/windowTitleForDocumentDisplayName: ((self hemlock-editor=
-window-controller) docname)
   (let* ((seq (slot-value self 'sequence)))
     (if (zerop seq)
@@ -3069,7 +3093,7 @@
       ;;(#/setDelegate: window self)
       (#/setDelegate: window controller)
       (setf (slot-value controller 'sequence) dupcount)
-      (#/setDelegate: (text-pane-text-view (slot-value window 'pane)) self)
+      (#/setDelegate: (text-pane-text-view (slot-value window 'pane)) cont=
roller)
       (#/addWindowController: self controller)
       (#/release controller)
       (#/setShouldCascadeWindows: controller nil)

Modified: release/1.10/source/cocoa-ide/cocoa-listener.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- release/1.10/source/cocoa-ide/cocoa-listener.lisp	(original)
+++ release/1.10/source/cocoa-ide/cocoa-listener.lisp	Thu Sep  4 16:34:54 2=
014
@@ -576,7 +576,7 @@
         (let* ((layout (#/objectAtIndex: layout-managers i)))
           (#/setBackgroundLayoutEnabled: layout nil))))
     (#/setDelegate: window controller)
-    (#/setDelegate: (text-pane-text-view (slot-value window 'pane)) self)
+    (#/setDelegate: (text-pane-text-view (slot-value window 'pane)) contro=
ller)
     (setf (slot-value controller 'sequence)
           (slot-value self 'dupcount))
     (#/setShouldCascadeWindows: controller nil)



More information about the Openmcl-cvs-notifications mailing list