Changeset 12539
- Timestamp:
- Aug 6, 2009, 3:23:32 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/cocoa-ide/hemlock/src/htext3.lisp
r12289 r12539 89 89 (if (eq charprops :neighbor) 90 90 (if (start-line-p mark) 91 (adjust- charprops-changes (line-charprops-changes line) 01)92 (adjust- charprops-changes (line-charprops-changes line) (1- charpos) 1))91 (adjust-line-charprops line 1) 92 (adjust-line-charprops line 1 :start (1- charpos))) 93 93 (let* ((next-props (next-charprops mark)) 94 94 (prev-props (previous-charprops mark))) 95 95 (cond ((charprops-equal charprops prev-props) 96 (format t "~& prev props (~s) equal" prev-props)97 (adjust- charprops-changes (line-charprops-changes line) (1- charpos) 1))96 ;;(format t "~& prev props (~s) equal" prev-props) 97 (adjust-line-charprops line 1 :start (1- charpos))) 98 98 ((charprops-equal charprops next-props) 99 (format t "~& next props (~s) equal" next-props)100 (adjust- charprops-changes (line-charprops-changes line) charpos 1))99 ;;(format t "~& next props (~s) equal" next-props) 100 (adjust-line-charprops (line-charprops-changes line) 1 :start charpos)) 101 101 (t 102 (format t "~& surrounding props (~s, ~s) not equal" prev-props next-props)103 (adjust- charprops-changes (line-charprops-changes line) charpos 1)102 ;;(format t "~& surrounding props (~s, ~s) not equal" prev-props next-props) 103 (adjust-line-charprops line 1 :start charpos) 104 104 (set-line-charprops line charprops :start charpos 105 105 :end (1+ charpos)))))) … … 145 145 (if (eq charprops :neighbor) 146 146 (if (start-line-p mark) 147 (adjust- charprops-changes (line-charprops-changes line) 0len)148 (adjust- charprops-changes (line-charprops-changes line) (1- charpos) len))147 (adjust-line-charprops line len) 148 (adjust-line-charprops line len :start (1- charpos))) 149 149 (let* ((next-props (next-charprops mark)) 150 150 (prev-props (previous-charprops mark))) 151 151 (cond ((charprops-equal charprops prev-props) 152 (format t "~& prev props (~s) equal" prev-props)153 (adjust- charprops-changes (line-charprops-changes line) (1- charpos) len))152 ;;(format t "~& prev props (~s) equal" prev-props) 153 (adjust-line-charprops line len :start (1- charpos))) 154 154 ((charprops-equal charprops next-props) 155 (format t "~& next props (~s) equal" next-props)156 (adjust- charprops-changes (line-charprops-changes line) charpos len))155 ;;(format t "~& next props (~s) equal" next-props) 156 (adjust-line-charprops line len :start charpos)) 157 157 (t 158 (format t "~& surrounding props (~s, ~s) not equal" prev-props next-props)158 ;;(format t "~& surrounding props (~s, ~s) not equal" prev-props next-props) 159 159 (set-line-charprops line charprops :start charpos 160 160 :end (+ charpos len)))))) … … 186 186 (first-charpos (mark-charpos start)) 187 187 (last-charpos (mark-charpos end)) 188 (nins (count-characters region))) 188 (nins (count-characters region)) 189 (dest-line (mark-line mark)) 190 (dest-charpos (mark-charpos mark))) 189 191 (cond 190 192 ((eq first-line last-line) … … 195 197 (eql last-charpos (length string))) 196 198 (setq string (subseq string first-charpos last-charpos))) 197 (insert-string mark string))) 199 (insert-string mark string) 200 (apply-line-charprops dest-line (line-charprops-changes first-line) 201 dest-charpos (+ dest-charpos (length string))))) 198 202 (t 199 203 (close-line) … … 213 217 (%sp-byte-blt old-chars 0 new-chars 0 charpos) 214 218 (%sp-byte-blt first-chars first-charpos new-chars charpos new-length) 215 (setf (line-chars line) new-chars)) 216 219 (setf (line-chars line) new-chars) 220 (apply-line-charprops line (line-charprops-changes first-line) 221 charpos (+ charpos first-length))) 222 217 223 ;; Copy intervening lines. We don't link the lines in until we are 218 224 ;; done in case the mark is within the region we are inserting. … … 236 242 (setf (line-next line) first) 237 243 (setf (line-chars new-line) new-chars) 244 (apply-line-charprops new-line (line-charprops-changes last-line) 245 0 last-charpos) 238 246 (setf (line-next previous) new-line) 239 247 (setf (line-next new-line) next) … … 259 267 (first-charpos (mark-charpos start)) 260 268 (last-charpos (mark-charpos end)) 261 (nins (count-characters region))) 269 (nins (count-characters region)) 270 (dest-line (mark-line mark)) 271 (dest-charpos (mark-charpos mark))) 262 272 (cond 263 273 ((eq first-line last-line) … … 268 278 (eql last-charpos (length string))) 269 279 (setq string (subseq string first-charpos last-charpos))) 270 (insert-string mark string))) 280 (insert-string mark string) 281 (apply-line-charprops dest-line (line-charprops-changes first-line) 282 dest-charpos (+ dest-charpos (length string))))) 271 283 (t 272 284 (when (bufferp (line-%buffer first-line)) … … 290 302 (%sp-byte-blt first-chars first-charpos new-chars charpos 291 303 new-length) 292 (setf (line-chars line) new-chars)) 304 (setf (line-chars line) new-chars) 305 (apply-line-charprops line (line-charprops-changes first-line) 306 charpos (+ charpos first-length))) 293 307 (let* ((last-chars (line-chars last-line)) 294 308 (old-length (length old-chars)) … … 297 311 (%sp-byte-blt last-chars 0 new-chars 0 last-charpos) 298 312 (%sp-byte-blt old-chars charpos new-chars last-charpos new-length) 299 (setf (line-chars last-line) new-chars)) 300 313 (setf (line-chars last-line) new-chars) 314 (apply-line-charprops last-line (line-charprops-changes last-line) 315 0 last-charpos)) 301 316 ;;; Link stuff together. 302 317 (setf (line-next last-line) next)
Note: See TracChangeset
for help on using the changeset viewer.