[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5615: 23.1.92; [PATCH] term.el: Calculation of window height is bad
From: |
npostavs |
Subject: |
bug#5615: 23.1.92; [PATCH] term.el: Calculation of window height is bad (new patch) |
Date: |
Thu, 10 Aug 2017 20:45:16 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
tags 5615 + patch
quit
Lars Ingebrigtsen <larsi@gnus.org> writes:
> IRIE Shinsuke <irieshinsuke@yahoo.co.jp> writes:
>
>> Sorry, the patch I sent with previous mail is bad, because the previous
>> patch was made without considering `line-spacing' specified by a
>> floating point number or frame-parameter.
>>
>> So I wrote the new patch. Please check it.
>
> [...]
>
> Is this still a problem in the current Emacs?
Current Emacs still uses the same (1- (window-height)) expression, but I
can't understand from the description when exactly this gives the wrong
result. Furthermore, I don't see any justification which would explain
why the new proposed significantly more complicated computation is more
correct. I think we should just use window-text-height.
>From b22407f5fedea77f34ca1efb5469e368164f9084 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Thu, 10 Aug 2017 20:43:13 -0400
Subject: [PATCH v2] * lisp/term.el (term-mode): Use `window-text-height'
(Bug#5615).
---
lisp/term.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/term.el b/lisp/term.el
index 5eb7b3e8ed..12a37cafbe 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1007,7 +1007,7 @@ term-mode
(setq indent-tabs-mode nil)
(setq buffer-display-table term-display-table)
(set (make-local-variable 'term-home-marker) (copy-marker 0))
- (set (make-local-variable 'term-height) (1- (window-height)))
+ (set (make-local-variable 'term-height) (window-text-height))
(set (make-local-variable 'term-width) (window-max-chars-per-line))
(set (make-local-variable 'term-last-input-start) (make-marker))
(set (make-local-variable 'term-last-input-end) (make-marker))
--
2.11.1
- bug#5615: 23.1.92; [PATCH] term.el: Calculation of window height is bad (new patch),
npostavs <=