Changeset 6578 for branches


Ignore:
Timestamp:
May 20, 2007, 9:04:18 AM (18 years ago)
Author:
Gary Byers
Message:

Back out of gap-context change, for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ide-1.0/ccl/hemlock/src/cursor.lisp

    r6571 r6578  
    145145;;;
    146146(defun cached-real-line-length (line width start end)
    147   (declare (fixnum width start end))
    148   (let* ((buffer (line-%buffer line))
    149          (offset (- (buffer-right-open-pos buffer) (buffer-left-open-pos buffer)))
     147  (declare (fixnum width start end) (ignore line))
     148  (let ((offset (- *right-open-pos* *left-open-pos*))
    150149        (bound 0))
    151150    (declare (fixnum offset bound))
    152151    (cond
    153      ((>= start (buffer-left-open-pos buffer))
     152     ((>= start *left-open-pos*)
    154153      (setq start (+ start offset)  bound (setq end (+ end offset))))
    155      ((> end (buffer-left-open-pos buffer))
    156       (setq bound (buffer-left-open-pos buffer)  end (+ end offset)))
     154     ((> end *left-open-pos*)
     155      (setq bound *left-open-pos*  end (+ end offset)))
    157156     (t
    158157      (setq bound end)))
     
    167166      (when (= start bound)
    168167        (when (= start end) (return (values xpos ypos)))
    169         (setq start (buffer-right-open-pos buffer)  bound end))
    170       (setq losing (%fcwa (buffer-open-chars buffer) start bound losing-char))
     168        (setq start *right-open-pos*  bound end))
     169      (setq losing (%fcwa *open-chars* start bound losing-char))
    171170      (cond
    172171       (losing
     
    174173          (truncate (+ xpos (- losing start)) width))
    175174        (setq ypos (+ ypos dy)  start losing)
    176         (do ((last (or (%fcwa (buffer-open-chars buffer) start bound winning-char) bound)) str)
     175        (do ((last (or (%fcwa *open-chars* start bound winning-char) bound)) str)
    177176            ((= start last))
    178177          (declare (fixnum last))
    179           (setq str (get-rep (schar (buffer-open-chars buffer) start)))
     178          (setq str (get-rep (schar *open-chars* start)))
    180179          (incf start)
    181180          (unless (simple-string-p str) (setq str (funcall str xpos)))
     
    297296  an infinitely wide screen.  This takes into account tabs and control
    298297  characters."
    299   (let* ((charpos (mark-charpos mark))
    300          (line (mark-line mark))
    301          (buffer (line-%buffer line)))
    302     (if (eq line (buffer-open-line buffer))
    303       (values (cached-real-line-length line 10000 0 charpos))
    304       (values (real-line-length line 10000 0 charpos)))))
     298  (let ((charpos (mark-charpos mark))
     299        (line (mark-line mark)))
     300    (if (eq line *open-line*)
     301        (values (cached-real-line-length line 10000 0 charpos))
     302        (values (real-line-length line 10000 0 charpos)))))
    305303
    306304
     
    312310;;;
    313311(defun find-position (line position start end width)
    314   (do* ((buffer (line-%buffer line))
    315         (cached (eq line (buffer-open-line buffer)))
     312  (do* ((cached (eq line *open-line*))
    316313        (lo start)
    317314        (hi (1- end))
Note: See TracChangeset for help on using the changeset viewer.