Changeset 13160 for release


Ignore:
Timestamp:
Nov 2, 2009, 5:30:20 PM (10 years ago)
Author:
rme
Message:

Merge 13130 from trunk (don't crash in split-line-charprops if
the line-charprops-changes is an empty vector)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/1.4/source/cocoa-ide/hemlock/src/charprops.lisp

    r12859 r13160  
    187187;;; before and after charpos.
    188188(defun split-line-charprops (line charpos)
    189   (let ((changes (line-charprops-changes line)))
    190     (when changes
     189  (let* ((changes (line-charprops-changes line))
     190         (nchanges (length changes)))
     191    (when (> nchanges 0)
    191192      (let ((left (make-array 2 :adjustable t :fill-pointer 0))
    192193            (right (make-array 2 :adjustable t :fill-pointer 0))
     
    196197              (change nil))
    197198             ((or pivot
    198                   (= i (length changes)))
     199                  (= i nchanges))
    199200              (if (null pivot)
    200201                ;; The last change extends to the end of line, so that will be the
     
    214215                      (setf (charprops-change-index c) 0)
    215216                      (push-charprops-change c right)))
    216                   (loop for i from pivot below (length changes)
     217                  (loop for i from pivot below nchanges
    217218                    as change = (aref changes i)
    218219                    do (decf (charprops-change-index change) charpos)
Note: See TracChangeset for help on using the changeset viewer.