Changeset main,59 for main


Ignore:
Timestamp:
11/16/2007 09:23:26 PM (19 years ago)
Author:
David Owen <dsowen@…>
branch-nick:
tui
revision id:
dsowen@fugue88.ws-20071116212326-d3d4i97aai8ut91n
Message:

Fixed clipping.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/output.lisp

    r52 r59  
    6060(defun add-clipped-string (window y x s)
    6161  ;; TODO: double check for ob1 in OVER.
    62   (multiple-value-bind (maxy maxx) (size window)
    63     (unless (<= 0 y maxy) (return-from add-clipped-string))
     62  (multiple-value-bind (height width) (size window)
     63    (unless (and (<= 0 y (1- height))
     64                 (<= x (1- width)))
     65      (return-from add-clipped-string))
    6466    (when (< x 0)
     67      (when (>= (- x) (length s))
     68        (return-from add-clipped-string))
    6569      (setf s (subseq s (- x))
    6670            x 0))
    67     (let ((over (- (+ x (length s)) maxx)))
     71    (let ((over (- (+ x (length s)) width)))
    6872      (when (> over 0)
    6973        (setf s (subseq s 0 (- (length s) over)))))
Note: See TracChangeset for help on using the changeset viewer.