[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 42d444114d8: * lisp/window.el (fit-window-to-buffer): Fix width c
From: |
Eli Zaretskii |
Subject: |
master 42d444114d8: * lisp/window.el (fit-window-to-buffer): Fix width calculation |
Date: |
Sun, 19 May 2024 04:07:47 -0400 (EDT) |
branch: master
commit 42d444114d8df0ffddf1e80891a386c0edcbd976
Author: Morgan Smith <Morgan.J.Smith@outlook.com>
Commit: Eli Zaretskii <eliz@gnu.org>
* lisp/window.el (fit-window-to-buffer): Fix width calculation
When PIXELWISE is nil, we still calculate width in pixels and
then convert it to columns. However, part of the calculation
was using columns where it should have used pixels. (Bug#70894)
---
lisp/window.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/window.el b/lisp/window.el
index 8feeba0d83e..e709e978cc9 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -9906,8 +9906,8 @@ accessible position."
;; the bottom is wider than the window.
(* (window-body-height window pixelwise)
(if pixelwise 1 char-height))))
- (- total-width
- (window-body-width window pixelwise)))))
+ (- (* total-width (if pixelwise 1 char-width))
+ (window-body-width window t)))))
(unless pixelwise
(setq width (/ (+ width char-width -1) char-width)))
(setq width (max min-width (min max-width width)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 42d444114d8: * lisp/window.el (fit-window-to-buffer): Fix width calculation,
Eli Zaretskii <=