diff options
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 5da662c2124..cdff8d7fc3a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5140,7 +5140,7 @@ or the frame." 0) 0))) (if (floatp lsp) - (setq lsp (* dfh lsp))) + (setq lsp (truncate (* (frame-char-height) lsp)))) (+ dfh lsp))) (defun window-screen-lines () @@ -5152,10 +5152,9 @@ in the window, not in units of the frame's default font, and also accounts 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) |