summaryrefslogtreecommitdiff
path: root/lisp/window.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-09-21 17:24:02 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-09-21 17:24:02 +0200
commit018278a8d095f79c001ad3b128cdba18ac8e2d5f (patch)
treec6e69f205b9a3983351acdb51293fa6b55c05696 /lisp/window.el
parentca4a37e0930b2bbb322ae3d1e9dc95f80d3966cd (diff)
downloademacs-018278a8d095f79c001ad3b128cdba18ac8e2d5f.tar.gz
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).
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 72957d846ae..9aca94d502a 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