anchor.diff:    (- (window-cur-linum window)
        (window-vtop-linum window)))
   
  +(defun window-redraw-line-1 (window str y)
  +  (when (string/= str (aref (window-display-lines window) y))
  +    (setf (aref (window-display-lines window) y) str)
  +    (cl-ncurses:mvwaddstr
  +     (window-win window) y 0
  +     (concatenate 'string
  +                  str
  +                  (make-string (- (window-ncols window) (length str))
  +                               :initial-element #\space)))
  +    (cl-ncurses:touchline (window-win) y 1)))
  +
   (defun window-redraw-line (window str y)
  -  (let ((width (str-width str))
  -        (cury (window-cursor-y window))
  -        (cols (window-ncols window))
  +  (let ((cury (window-cursor-y window))
           (curx))
       (when (= cury y)
         (setq curx (str-width str (window-cur-col window))))
  -    (cond
  -      ((< width (window-ncols window))
  -        nil)
  -      ((or (/= cury y)
  -           (< curx (1- cols)))
  -	(let ((i (wide-index str cols)))
  +    (when (string/= str (aref (window-display-lines window) y))
  +      (setf (aref (window-display-lines window) y) str)
  +      (let ((width (str-width str))
  +            (cols (window-ncols window)))
  +        (cond
  +         ((< width (window-ncols window))
  +          nil)
  +         ((or (/= cury y)
  +              (< curx (1- cols)))
  +          (let ((i (wide-index str cols)))
  +            (setq str
  +                  (if (<= cols (str-width str i))
  +                    (format nil "~a $" (subseq str 0 (1- i)))
  +                    (format nil "~a$" (subseq str 0 i))))))
  +         ((< (window-cur-col window) (length str))
  +          (let* ((begin (wide-index str (- curx cols -4)))
  +                 (end (1+ (window-cur-col window)))
  +                 (substr (subseq str begin end)))
  +            (setq curx (- cols 2))
  +            (if (wide-char-p (aref substr (- (length substr) 1)))
  +              (progn
  +                (setq str
  +                      (format nil "$~a $"
  +                              (subseq substr 0 (1- (length substr)))))
  +                (decf curx))
  +              (setq str (format nil "$~a$" substr)))))
  +         (t
             (setq str
  -                (if (<= cols (str-width str i))
  -                  (format nil "~a $" (subseq str 0 (1- i)))
  -                  (format nil "~a$" (subseq str 0 i))))))
  -      ((< (window-cur-col window) (length str))
  -        (let* ((begin (wide-index str (- curx cols -4)))
  -	       (end (1+ (window-cur-col window)))
  -	       (substr (subseq str begin end)))
  -          (setq curx (- cols 2))
  -          (if (wide-char-p (aref substr (- (length substr) 1)))
  -            (progn
  -              (setq str
  -                    (format nil "$~a $"
  -                            (subseq substr 0 (1- (length substr)))))
  -              (decf curx))
  -            (setq str (format nil "$~a$" substr)))))
  -      (t
  -        (setq str
  -              (format nil
  -                      "$~a"
  -                      (substring-width str (- curx cols -3))))
  -        (setq curx (- cols 1))))
  -    (cl-ncurses:mvwaddstr (window-win window) y 0 str)
  +                (format nil
  +                        "$~a"
  +                        (substring-width str (- curx cols -3))))
  +          (setq curx (- cols 1))))
  +        (cl-ncurses:mvwaddstr
  +         (window-win window) y 0
  +         (concatenate 'string
  +                      str
  +                      (make-string (- (window-ncols window) (length str))
  +                                   :initial-element #\space)))
  +        (cl-ncurses:touchline (window-win) y 1)))
       curx))
   
   (defun window-redraw-lines (window)
  
positive.code: (defun make-window (buffer nlines ncols y x)
    (let ((window
           (make-instance 'window
            :win (cl-ncurses:newwin nlines ncols y x)
            :nlines nlines
            :ncols ncols
            :y y
            :x x
            :buffer buffer
            :vtop-linum 1
            :cur-linum 1
            :cur-col 0
            :max-col 0)))
      window))
  
  (defvar *current-cols*)
  
negative.code:   y
    x
    buffer
    display-lines
    vtop-linum
    cur-linum
    cur-col
  