GNU bug report logs - #5615
23.1.92; [PATCH] term.el: Calculation of window height is bad

Previous Next

Package: emacs;

Reported by: irieshinsuke <at> yahoo.co.jp

Date: Sun, 21 Feb 2010 06:10:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #23 received at 5615 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: IRIE Shinsuke <irieshinsuke <at> yahoo.co.jp>, 5615 <at> debbugs.gnu.org
Subject: Re: 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
[Message part 1 (text/plain, inline)]
tags 5615 + patch
quit

Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> IRIE Shinsuke <irieshinsuke <at> 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.

[v2-0001-lisp-term.el-term-mode-Use-window-text-height-Bug.patch (text/x-diff, inline)]
From b22407f5fedea77f34ca1efb5469e368164f9084 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> 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


This bug report was last modified 7 years and 358 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.