summaryrefslogtreecommitdiff
path: root/doc/lispref/display.texi
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2021-12-18 18:48:11 +0800
committerPo Lu <luangruo@yahoo.com>2021-12-18 19:16:16 +0800
commit43c4cc2ea29fa93de17d35e9cce4949eae171c45 (patch)
treeb66c52d80819c53bf8487c517224be2de757af6d /doc/lispref/display.texi
parent3fea95b79f7a80fc84f0aee38e1f31234ed7c657 (diff)
downloademacs-43c4cc2ea29fa93de17d35e9cce4949eae171c45.tar.gz
emacs-43c4cc2ea29fa93de17d35e9cce4949eae171c45.tar.bz2
emacs-43c4cc2ea29fa93de17d35e9cce4949eae171c45.zip
Add new argument `ignore-line-at-end' to `window-text-pixel-size'
* doc/lispref/display.texi (Size of Displayed Text): Update documentation. * etc/NEWS: Announce new argument. * src/xdisp.c (window_text_pixel_size): Allow controlling if the iterator's ascent and descent will be appended to the pixel height returned. All callers changed. (Fwindow_text_pixel_size): New argument `ignore-line-at-end'. All callers changed.
Diffstat (limited to 'doc/lispref/display.texi')
-rw-r--r--doc/lispref/display.texi6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index b82473f9c20..92bfd2fea19 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2086,7 +2086,7 @@ displayed in a given window. This function is used by
(@pxref{Resizing Windows}) to make a window exactly as large as the text
it contains.
-@defun window-text-pixel-size &optional window from to x-limit y-limit mode-lines
+@defun window-text-pixel-size &optional window from to x-limit y-limit mode-lines ignore-line-at-end
This function returns the size of the text of @var{window}'s buffer in
pixels. @var{window} must be a live window and defaults to the
selected one. The return value is a cons of the maximum pixel-width
@@ -2136,6 +2136,10 @@ line, if present, in the return value. If it is @code{t}, include the
height of all of these lines, if present, in the return value.
@end defun
+The optional argument @var{ignore-line-at-end} controls whether or
+not to count the height of text in @var{to}'s screen line as part of
+the returned pixel-height.
+
@code{window-text-pixel-size} treats the text displayed in a window as a
whole and does not care about the size of individual lines. The
following function does.