+2014-08-05 Eli Zaretskii <eliz@gnu.org>
+
+ * simple.el (default-line-height): A floating-point value of
+ line-spacing means a fraction of the default frame font's height,
+ not of the font currently used by the 'default' face. Truncate
+ the pixel value, like the display engine does.
+ (window-screen-lines): Use window-inside-pixel-edges for
+ determining the window height in pixels. (Bug#18195)
+
2014-07-29 Eli Zaretskii <eliz@gnu.org>
* tutorial.el (tutorial--display-changes): Accept punctuation
0)
0)))
(if (floatp lsp)
- (setq lsp (* dfh lsp)))
+ (setq lsp (truncate (* (frame-char-height) lsp))))
(+ dfh lsp)))
(defun window-screen-lines ()
for `line-spacing', if any, defined for the window's buffer or frame.
The value is a floating-point number."
- (let ((canonical (window-text-height))
- (fch (frame-char-height))
+ (let ((edges (window-inside-pixel-edges))
(dlh (default-line-height)))
- (/ (* (float canonical) fch) dlh)))
+ (/ (float (- (nth 3 edges) (nth 1 edges))) dlh)))
;; Returns non-nil if partial move was done.
(defun line-move-partial (arg noerror to-end)