all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: IRIE Shinsuke <irieshinsuke@yahoo.co.jp>
Cc: 5615@debbugs.gnu.org
Subject: bug#5615: 23.1.92; [PATCH] term.el: Calculation of window height is bad (new patch)
Date: Sun, 28 Feb 2016 17:06:57 +1100	[thread overview]
Message-ID: <87oab1tlku.fsf@gnus.org> (raw)
In-Reply-To: <4BA35102.7050506@yahoo.co.jp> (IRIE Shinsuke's message of "Fri,  19 Mar 2010 19:25:06 +0900")

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?

> + (defun term-window-height ()
> +   (if (display-graphic-p)
> +       (let ((e (window-inside-pixel-edges))
> + 	    (s (or (with-current-buffer (window-buffer) line-spacing)
> + 		   (frame-parameter nil 'line-spacing)
> + 		   0)))
> + 	(if (floatp s)
> + 	    (setq s (truncate (* (frame-char-height) s))))
> + 	(/ (+ (- (nth 3 e) (cadr e)) s)
> + 	   (+ (frame-char-height) s)))
> +     (window-text-height)))
>   \f
>   (put 'term-mode 'mode-class 'special)

[...]

>   (defun term-check-size (process)
> !   (when (or (/= term-height (1- (window-height)))
>   	    (/= term-width (term-window-width)))
> !     (term-reset-size (1- (window-height)) (term-window-width))
>       (set-process-window-size process term-height term-width)))
>   
>   (defun term-send-raw-string (chars)
> --- 1193,1201 ----
>       found))
>   
>   (defun term-check-size (process)
> !   (when (or (/= term-height (term-window-height))
>   	    (/= term-width (term-window-width)))
> !     (term-reset-size (term-window-height) (term-window-width))
>       (set-process-window-size process term-height term-width)))
>   
>   (defun term-send-raw-string (chars)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2016-02-28  6:06 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 [this message]
2017-08-11  0:45     ` npostavs
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=87oab1tlku.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=5615@debbugs.gnu.org \
    --cc=irieshinsuke@yahoo.co.jp \
    /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.