[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117506: Fix `fit-window-to-buffer' (Bug#18498).
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] emacs-24 r117506: Fix `fit-window-to-buffer' (Bug#18498). |
Date: |
Thu, 18 Sep 2014 12:06:34 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117506
revision-id: address@hidden
parent: address@hidden
author: Kan-Ru Chen <address@hidden>
committer: martin rudalics <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-09-18 14:06:17 +0200
message:
Fix `fit-window-to-buffer' (Bug#18498).
* window.el (fit-window-to-buffer): When counting buffer width,
count the whole visible buffer. Correctly convert the body-height
to pixel size for window-text-pixel-size (Bug#18498).
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/window.el window.el-20091113204419-o5vbwnq5f7feedwu-94
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-09-14 23:59:57 +0000
+++ b/lisp/ChangeLog 2014-09-18 12:06:17 +0000
@@ -1,3 +1,9 @@
+2014-09-18 Kan-Ru Chen <address@hidden>
+
+ * window.el (fit-window-to-buffer): When counting buffer width,
+ count the whole visible buffer. Correctly convert the body-height
+ to pixel size for window-text-pixel-size (Bug#18498).
+
2014-09-14 Glenn Morris <address@hidden>
* image.el (image-multi-frame-p): Fix thinko - do not force
=== modified file 'lisp/window.el'
--- a/lisp/window.el 2014-09-12 06:26:46 +0000
+++ b/lisp/window.el 2014-09-18 12:06:17 +0000
@@ -7289,10 +7289,10 @@
max-width))
(+ total-width (window-max-delta
nil t nil nil nil nil pixelwise))))
- ;; When fitting vertically, assume that WINDOW's start
- ;; position remains unaltered. WINDOW can't get wider
- ;; than its frame's pixel width, its height remains
- ;; unaltered.
+ ;; When fitting horizontally, assume that WINDOW's
+ ;; start position remains unaltered. WINDOW can't get
+ ;; wider than its frame's pixel width, its height
+ ;; remains unaltered.
(width (+ (car (window-text-pixel-size
nil (window-start) (point-max)
(frame-pixel-width)
@@ -7301,7 +7301,7 @@
;; overshoots when the first line below
;; the bottom is wider than the window.
(* body-height
- (if pixelwise char-height 1))))
+ (if pixelwise 1 char-height))))
(window-right-divider-width))))
(unless pixelwise
(setq width (/ (+ width char-width -1) char-width)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117506: Fix `fit-window-to-buffer' (Bug#18498).,
Martin Rudalics <=