 with 1 referring to the bottom line in the window."
   (interactive)
   (if smooth-scroll-strict-margins
-      (count-screen-lines (point) (window-end))
-    (count-lines (point) (window-end))))
+      (count-screen-lines (point) (window-end nil t))
+    (count-lines (point) (window-end nil t))))
 ;;;_ + after advice
 (defadvice previous-line (after smooth-scroll-down
                             (&optional arg try-vscroll)

      (save-excursion
        (scroll-down
              (1+ (- smooth-scroll-margin lines-from-window-top))))))))
                            
(defadvice next-line (after smooth-scroll-up
                            (&optional arg try-vscroll)
                            activate)

;;
;; - Maybe add option to avoid scroll jumps when point is within
;;   margin.
;;
;;;_* Acknowledgements
;;
;; Thanks to Mark Hulme-Jones and consolers on #emacs for helping
;; debug issues with line-wrapping.
;;
;;;_* License
;;
;; Released under the GNU General Public License v2 or later, with
;; all rights assigned to the Free Software Foundation.
;;
