From: npostavs@users.sourceforge.net
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: IRIE Shinsuke <irieshinsuke@yahoo.co.jp>, 5615@debbugs.gnu.org
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 [thread overview]
Message-ID: <87bmnn2aqr.fsf@users.sourceforge.net> (raw)
In-Reply-To: <87oab1tlku.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 28 Feb 2016 17:06:57 +1100")
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 951 bytes --]
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
next prev parent reply other threads:[~2017-08-11 0:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4B80CB5A.8080306@yahoo.co.jp>
2010-03-19 10:23 ` bug#5615: 23.1.92; [PATCH] term.el: Calculation of window height is bad (new patch) IRIE Shinsuke
2010-03-19 10:25 ` IRIE Shinsuke
2016-02-28 6:06 ` Lars Ingebrigtsen
2017-08-11 0:45 ` npostavs [this message]
2017-08-11 6:32 ` Eli Zaretskii
2017-08-20 3:34 ` npostavs
2010-03-19 10:38 ` IRIE Shinsuke
2010-05-30 5:23 ` Ken Hori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bmnn2aqr.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=5615@debbugs.gnu.org \
--cc=irieshinsuke@yahoo.co.jp \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.