- Timestamp:
- May 20, 2007, 9:04:18 AM (18 years ago)
- File:
-
- 1 edited
-
branches/ide-1.0/ccl/hemlock/src/cursor.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ide-1.0/ccl/hemlock/src/cursor.lisp
r6571 r6578 145 145 ;;; 146 146 (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*)) 150 149 (bound 0)) 151 150 (declare (fixnum offset bound)) 152 151 (cond 153 ((>= start (buffer-left-open-pos buffer))152 ((>= start *left-open-pos*) 154 153 (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))) 157 156 (t 158 157 (setq bound end))) … … 167 166 (when (= start bound) 168 167 (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)) 171 170 (cond 172 171 (losing … … 174 173 (truncate (+ xpos (- losing start)) width)) 175 174 (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) 177 176 ((= start last)) 178 177 (declare (fixnum last)) 179 (setq str (get-rep (schar (buffer-open-chars buffer)start)))178 (setq str (get-rep (schar *open-chars* start))) 180 179 (incf start) 181 180 (unless (simple-string-p str) (setq str (funcall str xpos))) … … 297 296 an infinitely wide screen. This takes into account tabs and control 298 297 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))))) 305 303 306 304 … … 312 310 ;;; 313 311 (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*)) 316 313 (lo start) 317 314 (hi (1- end))
Note:
See TracChangeset
for help on using the changeset viewer.
