/[flexichain]/flexichain/flexicursor.lisp
ViewVC logotype

Diff of /flexichain/flexicursor.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by charmon, Fri Jan 25 23:59:21 2008 UTC revision 1.4 by rstrandh, Sat Jan 26 11:23:09 2008 UTC
# Line 204  sequence was inserted using INSERT.")) Line 204  sequence was inserted using INSERT."))
204        (incf position n)        (incf position n)
205        (setf n (* -1 n)))        (setf n (* -1 n)))
206      (unless (zerop n)      (unless (zerop n)
207        (let* ((start-index (position-index chain position))        (loop for cursor-wp in cursors
208               (end-index (position-index chain (+ position n -1))))           as cursor = (weak-pointer-value cursor-wp)
209          (loop for cursor-wp in cursors           when (and cursor (<= position (cursor-pos cursor)
210             as cursor = (weak-pointer-value cursor-wp)                                (+ position n)))
211             when (and cursor (<= start-index (flexicursor-index cursor)           do (typecase cursor
212                                  end-index))                (right-sticky-flexicursor (setf (cursor-pos cursor)
213             do (typecase cursor                                                (+ position n)))
214                  (right-sticky-flexicursor (setf (cursor-pos cursor)                (left-sticky-flexicursor (setf (cursor-pos cursor)
215                                                  (+ position n)))                                               position)))))))
                 (left-sticky-flexicursor (setf (cursor-pos cursor)  
                                                position))))))))  
216    
217  (defmethod delete> ((cursor standard-flexicursor) &optional (n 1))  (defmethod delete> ((cursor standard-flexicursor) &optional (n 1))
218    (let ((chain (chain cursor))    (let ((chain (chain cursor))

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.5