Changeset 14722
- Timestamp:
- Apr 21, 2011, 6:28:48 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/cocoa-ide/cocoa-editor.lisp
r14660 r14722 1544 1544 (atom-mode (or (eql g #$NSSelectByParagraph) 1545 1545 (and (eql index (#/length textstorage)) 1546 (let* ((event (#/currentEvent (#/window self)))) 1547 (and (eql (#/type event) #$NSLeftMouseDown) 1546 (let* ((event (#/currentEvent (#/window self))) 1547 (type (#/type event))) 1548 (and (or (eql type #$NSLeftMouseDown) (eql type #$NSLeftMouseUp)) 1548 1549 (> (#/clickCount event) 2))))))) 1549 1550 (hi::with-mark ((mark point)) … … 1551 1552 (when region 1552 1553 ;; Act as if we started the selection at the other end, so the heuristic 1553 ;; in #/selectionRangeForProposedRange does the right thing. ref bug #565. 1554 (cond ((hi::mark= (hi::region-start region) mark) 1555 (hi::move-mark point (hi::region-end region))) 1556 ((hi::mark= (hi::region-end region) mark) 1557 (hi::move-mark point (hi::region-start region)))) 1554 ;; in #/setSelectedRange does the right thing. ref bug #565. 1555 ;; However, only do so on mouse up, ref bug #851. 1556 (when (eql (#/type (#/currentEvent (#/window self))) #$NSLeftMouseUp) 1557 (cond ((hi::mark= (hi::region-start region) mark) 1558 (hi::move-mark point (hi::region-end region))) 1559 ((hi::mark= (hi::region-end region) mark) 1560 (hi::move-mark point (hi::region-start region))))) 1558 1561 (let ((start (hi::mark-absolute-position (hi::region-start region))) 1559 1562 (end (hi::mark-absolute-position (hi::region-end region))))
Note: See TracChangeset
for help on using the changeset viewer.