### Fixes in window size functions around Bug#16430 and Bug#16470.

```* window.c (Fwindow_pixel_width, Fwindow_pixel_height)
(Fwindow_right_divider_width, Fwindow_bottom_divider_width):
(Fwindow_total_height, Fwindow_total_width): New argument ROUND.
Rewrite doc-strings.
(window_body_height, window_body_width): Do not count partially
visible lines/columns when PIXELWISE is nil (Bug#16470).
(Qfloor, Qceiling): New symbols.
* window.el (window-total-size, window-size): New argument
ROUND.
(window--min-delta-1, window-min-delta, window--max-delta-1): Be
more conservative when calculating the numbers of lines or
columns a window can shrink (Bug#16430).
(fit-window-to-buffer): Simplify code.
* term.el (term-window-width): Call window-body-width again.```
parent 29f5e020
 2014-01-22 Martin Rudalics Fixes in window size functions around Bug#16430 and Bug#16470. * window.el (window-total-size, window-size): New argument ROUND. (window--min-delta-1, window-min-delta, window--max-delta-1): Be more conservative when calculating the numbers of lines or columns a window can shrink (Bug#16430). (fit-window-to-buffer): Simplify code. * term.el (term-window-width): Call window-body-width again. 2014-01-22 Glenn Morris * image.el (image-format-suffixes): Doc fix. ... ...
 ... ... @@ -975,9 +975,8 @@ is buffer-local." (display-graphic-p) overflow-newline-into-fringe (/= (frame-parameter nil 'right-fringe) 0)) ;; Call window-text-width instead of window-width (Bug#16470). (window-text-width) (1- (window-text-width)))) (window-body-width) (1- (window-body-width)))) (put 'term-mode 'mode-class 'special) ... ...
 ... ... @@ -1013,18 +1013,21 @@ FRAME defaults to the selected frame." (window--atom-check frame)) ;;; Window sizes. (defun window-total-size (&optional window horizontal) (defun window-total-size (&optional window horizontal round) "Return the total height or width of WINDOW. WINDOW must be a valid window and defaults to the selected one. If HORIZONTAL is omitted or nil, return the total height of WINDOW, in lines, like `window-total-height'. Otherwise return the total width, in columns, like `window-total-width'." the total width, in columns, like `window-total-width'. Optional argument ROUND is handled as for `window-total-height' and `window-total-width'." (if horizontal (window-total-width window) (window-total-height window))) (window-total-width window round) (window-total-height window round))) (defun window-size (&optional window horizontal pixelwise) (defun window-size (&optional window horizontal pixelwise round) "Return the height or width of WINDOW. WINDOW must be a valid window and defaults to the selected one. ... ... @@ -1033,14 +1036,18 @@ WINDOW, in lines, like `window-total-height'. Otherwise return the total width, in columns, like `window-total-width'. Optional argument PIXELWISE means return the pixel size of WINDOW like `window-pixel-height' and `window-pixel-width'." like `window-pixel-height' and `window-pixel-width'. Optional argument ROUND is ignored if PIXELWISE is non-nil and handled as for `window-total-height' and `window-total-width' otherwise." (if horizontal (if pixelwise (window-pixel-width window) (window-total-width window)) (window-total-width window round)) (if pixelwise (window-pixel-height window) (window-total-height window)))) (window-total-height window round)))) (defvar window-size-fixed nil "Non-nil in a buffer means windows displaying the buffer are fixed-size. ... ... @@ -1316,7 +1323,7 @@ WINDOW can be resized in the desired direction. The function (unless (eq sub window) (setq delta (min delta (- (window-size sub horizontal pixelwise) (- (window-size sub horizontal pixelwise 'floor) (window-min-size sub horizontal ignore pixelwise))))) (setq sub (window-right sub)))) ... ... @@ -1356,7 +1363,7 @@ at least one other window can be enlarged appropriately. Optional argument PIXELWISE non-nil means return number of pixels by which WINDOW can be shrunk." (setq window (window-normalize-window window)) (let ((size (window-size window horizontal pixelwise)) (let ((size (window-size window horizontal pixelwise 'floor)) (minimum (window-min-size window horizontal ignore pixelwise))) (cond (nodown ... ... @@ -1393,7 +1400,7 @@ by which WINDOW can be shrunk." (t (setq delta (+ delta (- (window-size sub horizontal pixelwise) (- (window-size sub horizontal pixelwise 'floor) (window-min-size sub horizontal ignore pixelwise)))))) (setq sub (window-right sub)))) ... ... @@ -7131,8 +7138,7 @@ accessible position." (window-bottom-divider-width))) ;; Round height. (unless pixelwise (setq height (+ (/ height char-height) (if (zerop (% height char-height)) 0 1)))) (setq height (/ (+ height char-height -1) char-height))) (unless (= height total-height) (window-resize-no-error window ... ... @@ -7185,8 +7191,7 @@ accessible position." (if pixelwise char-height 1)))) (window-right-divider-width)))) (unless pixelwise (setq width (+ (/ width char-width) (if (zerop (% width char-width)) 0 1)))) (setq width (/ (+ width char-width -1) char-width))) (unless (= width body-width) (window-resize-no-error window ... ...
 2014-01-22 Martin Rudalics Fixes in window size functions around Bug#16430 and Bug#16470. * window.c (Fwindow_pixel_width, Fwindow_pixel_height) (Fwindow_mode_line_height, Fwindow_header_line_height) (Fwindow_right_divider_width, Fwindow_bottom_divider_width): Minor doc-string adjustments. (Fwindow_total_height, Fwindow_total_width): New argument ROUND. Rewrite doc-strings. (window_body_height, window_body_width): Do not count partially visible lines/columns when PIXELWISE is nil (Bug#16470). (Qfloor, Qceiling): New symbols. 2014-01-21 Eli Zaretskii * w32fns.c (unwind_create_frame): Avoid crashing inside assertion ... ...
{"ft_lang_label":"__label__en","ft_lang_prob":0.54981875,"math_prob":0.77431285,"size":909,"snap":"2021-21-2021-25","text_gpt3_token_len":225,"char_repetition_ratio":0.1756906,"word_repetition_ratio":0.0,"special_character_ratio":0.24862486,"punctuation_ratio":0.20547946,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95017636,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-05-08T15:48:56Z\",\"WARC-Record-ID\":\"<urn:uuid:1674d080-61fa-4524-b280-e58074be9ffd>\",\"Content-Length\":\"707115\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:64b33422-732d-472b-8c54-a0f345bce13b>\",\"WARC-Concurrent-To\":\"<urn:uuid:4e89ad74-2730-4dc4-b214-2f72f4182500>\",\"WARC-IP-Address\":\"209.51.188.225\",\"WARC-Target-URI\":\"https://emba.gnu.org/emacs/emacs/-/commit/6cb4da45dc3d0660a65b29e192e82a37e3ad505c\",\"WARC-Payload-Digest\":\"sha1:RO7RRV4JKAPAEQDH6VDOTFA7X2TUM5KH\",\"WARC-Block-Digest\":\"sha1:O4JQOZBNMIZ5LBRS2QB2FKQXSGLRZ4T4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-21/CC-MAIN-2021-21_segments_1620243988882.94_warc_CC-MAIN-20210508151721-20210508181721-00355.warc.gz\"}"}