GNU bug report logs -
#5615
23.1.92; [PATCH] term.el: Calculation of window height is bad
Previous Next
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
View this message in rfc822 format
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?
> + (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)))
>
> (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
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.