emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 018278a: Fix recent change to window-max-chars-per-line


From: Lars Ingebrigtsen
Subject: master 018278a: Fix recent change to window-max-chars-per-line
Date: Mon, 21 Sep 2020 11:24:27 -0400 (EDT)

branch: master
commit 018278a8d095f79c001ad3b128cdba18ac8e2d5f
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix recent change to window-max-chars-per-line
    
    * lisp/window.el (window-max-chars-per-line):
    line-number-display-width can return a floating point number, but
    we want an integer (bug#43548).
---
 lisp/window.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/window.el b/lisp/window.el
index 72957d8..9aca94d 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2173,7 +2173,7 @@ the font."
     (let* ((window-width (window-body-width window t))
           (font-width (window-font-width window face))
           (ncols (- (/ window-width font-width)
-                     (line-number-display-width 'columns))))
+                     (ceiling (line-number-display-width 'columns)))))
       (if (and (display-graphic-p)
               overflow-newline-into-fringe
                (not



reply via email to

[Prev in Thread] Current Thread [Next in Thread]