branch: master commit a042e0d4f39c0189deb20f360bf50dca6a6ba265 Author: Michael Heerdegen <michael_heerde...@web.de> Commit: Michael Heerdegen <michael_heerde...@web.de>
avoid error when user sets on-screen-treat-cut-lines to just t instead of a float --- on-screen.el | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/on-screen.el b/on-screen.el index bc73730..fa7027c 100644 --- a/on-screen.el +++ b/on-screen.el @@ -284,7 +284,8 @@ Type M-x customize-group on-screen RET for configuration." (if (not (cddr vis)) start (cl-destructuring-bind (_x _y rtop _rbot rowh _vpos) vis - (if (< (/ (float rtop) (+ rtop rowh)) on-screen-treat-cut-lines) ;; count as visible + (if (< (/ (float rtop) (+ rtop rowh)) + (if (floatp on-screen-treat-cut-lines) on-screen-treat-cut-lines .4)) ;; count as visible start (with-current-buffer (window-buffer window) (save-excursion @@ -299,7 +300,8 @@ Type M-x customize-group on-screen RET for configuration." (if (not (cddr vis)) end (cl-destructuring-bind (_x _y _rtop rbot rowh _vpos) vis - (if (< (/ (float rbot) (+ rbot rowh)) on-screen-treat-cut-lines) ;; count as visible + (if (< (/ (float rbot) (+ rbot rowh)) + (if (floatp on-screen-treat-cut-lines) on-screen-treat-cut-lines .4)) ;; count as visible end (with-current-buffer (window-buffer window) (save-excursion