anchor.diff:    (- (window-cur-linum window)
        (window-vtop-linum window)))
   
  +(defun window-cursor-y-if-wrapping (window)
  +  (if (buffer-truncate-lines (window-buffer window))
  +      (+ (- (window-cur-linum window)
  +            (window-vtop-linum window))
  +         (window-wrapping-offset window))
  +      (window-cursor-y window)))
  +
   (defun window-print-char (win y x str attr)
     (charms/ll:wattron win attr)
     (charms/ll:mvwaddstr win y (str-width str 0 x) (string (schar str x)))
  
positive.code:   (if (minusp n)
        (scroll-down (- n))
        (dotimes (_ n t)
          (when (and (= (window-cursor-y *current-window*)
                        (- (window-nlines) 2))
                     (/= 1 (window-vtop-linum)))
            (unless (prev-line n)
              (return nil)))
          (let ((prev (window-vtop-linum)))
            (window-scroll *current-window* (- 1))
            (when (= prev (window-vtop-linum))
              (return nil))))))
  
negative.code:   (if (minusp n)
        (scroll-up (- n))
        (dotimes (_ n t)
          (when (= (window-cursor-y-if-wrapping *current-window*) 0)
            (unless (next-line n)
              (return nil)))
          (let ((prev-linum (window-vtop-linum))
                (prev-column (window-vtop-column)))
            (window-scroll *current-window* 1)
            (when (and (= prev-linum (window-vtop-linum))
                       (= prev-column (window-vtop-column)))
              (return nil))))))
  
  (define-key *global-keymap* (kbd "C-x C-p") 'scroll-up)
  