Changeset 14492 for trunk/source/cocoa-ide/cocoa-editor.lisp
- Timestamp:
- Dec 17, 2010, 2:22:23 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/cocoa-ide/cocoa-editor.lisp
r14491 r14492 1116 1116 (unless *layout-text-in-background* 1117 1117 (#/setDelegate: layout +null-ptr+) 1118 #-cocotron 1118 1119 (#/setBackgroundLayoutEnabled: layout nil))) 1119 1120 … … 1150 1151 1151 1152 1152 (defmethod compute-temporary-attributes ((self hemlock-textstorage-text-view)) (let* ((container (#/textContainer self)) 1153 (defmethod compute-temporary-attributes ((self hemlock-textstorage-text-view)) 1154 #-cocotron 1155 (let* ((container (#/textContainer self)) 1153 1156 ;; If there's a containing scroll view, use its contentview 1154 1157 ;; Otherwise, just use the current view. … … 1163 1166 (start (ns:ns-range-location char-range)) 1164 1167 (length (ns:ns-range-length char-range))) 1165 #-cocotron1166 1168 (when (> length 0) 1167 1169 ;; Remove all temporary attributes from the character range … … 1174 1176 (hi::*current-buffer* (buffer-cache-buffer cache))) 1175 1177 (multiple-value-bind (start-line start-offset) 1176 1178 (update-line-cache-for-index cache start) 1177 1179 (let* ((end-line (update-line-cache-for-index cache (+ start length)))) 1178 1180 (set-temporary-character-attributes … … 1180 1182 (- start start-offset) 1181 1183 start-line 1182 (hi::line-next end-line)))))) 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 (#/endEditing ts)))))))1184 (hi::line-next end-line))))))) 1185 (when (eql #$YES (text-view-paren-highlight-enabled self)) 1186 (let* ((background #&NSBackgroundColorAttributeName) 1187 (paren-highlight-left (text-view-paren-highlight-left-pos self)) 1188 (paren-highlight-right (text-view-paren-highlight-right-pos self)) 1189 (paren-highlight-color (text-view-paren-highlight-color self)) 1190 (attrs (#/dictionaryWithObject:forKey: ns:ns-dictionary 1191 paren-highlight-color 1192 background)) 1193 (ts (#/textStorage self))) 1194 (ns:with-ns-range (left-range paren-highlight-left 1) 1195 (ns:with-ns-range (right-range paren-highlight-right 1) 1196 (#/beginEditing ts) 1197 (#/addAttributes:range: ts attrs left-range) 1198 ;;(#/edited:range:changeInLength: ts #$NSTextStorageEditedAttributes left-range 0) 1199 (#/addAttributes:range: ts attrs right-range) 1200 ;;(#/edited:range:changeInLength: ts #$NSTextStorageEditedAttributes right-range 0) 1201 (#/endEditing ts)))))) 1200 1202 1201 1203 (defmethod update-paren-highlight ((self hemlock-textstorage-text-view)) … … 1296 1298 ;;; HI::*CURRENT-BUFFER* is bound to the buffer containing START-LINE 1297 1299 ;;; and END-LINE 1300 #-cocotron 1298 1301 (defun set-temporary-character-attributes (layout pos start-line end-line) 1299 1302 (ns:with-ns-range (range) … … 3497 3500 string) 3498 3501 (assume-cocoa-thread) 3499 (let* ((doc (#/makeUntitledDocumentOfType:error: self #@"html" +null-ptr+))) 3502 (let* ((doc #+cocotron (#/makeUntitledDocumentOfType: self #@"html") 3503 #-cocotron (#/makeUntitledDocumentOfType:error: self #@"html" +null-ptr+))) 3500 3504 (unless (%null-ptr-p doc) 3501 3505 (#/addDocument: self doc)
Note: See TracChangeset
for help on using the changeset viewer.