diff options
| author | Glenn Morris | 2018-11-20 09:38:42 -0800 |
|---|---|---|
| committer | Glenn Morris | 2018-11-20 09:38:42 -0800 |
| commit | bb7b75d7110c7a46407aa4efc33446ace0cba631 (patch) | |
| tree | 110ea4c557a39818da2ed8ebcea40f237b48a0f6 /src/window.c | |
| parent | e1b2c21b431accc397219b432a76a716acc6dbc2 (diff) | |
| parent | 070e82b96bfadb5a3622607a8c5c97c127ec62db (diff) | |
| download | emacs-bb7b75d7110c7a46407aa4efc33446ace0cba631.tar.gz emacs-bb7b75d7110c7a46407aa4efc33446ace0cba631.zip | |
Merge from origin/emacs-26
070e82b ; * src/window.c (window_scroll): Improve commentary.
60457d7 Improve documentation of the window tree
ea1a014 Fix window scrolling on TTY frames when there's no mode line
df7ed10 Fix decoding XML files encoded in ISO-8859
7851ae8 (tag: emacs-26.1.90) ; ChangeLog.3 update
1958808 * etc/AUTHORS: Update.
7252507 Fix description of some window hooks
88762b4 Run 'window--adjust-process-windows' when frame size changes ...
d6542ea Avoid errors in zone.el when there's overlay at EOB
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/window.c b/src/window.c index 20084a15c16..31e9782b4a8 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -4970,25 +4970,21 @@ window_wants_header_line (struct window *w) | |||
| 4970 | : 0); | 4970 | : 0); |
| 4971 | } | 4971 | } |
| 4972 | 4972 | ||
| 4973 | /* Return number of lines of text (not counting mode lines) in W. */ | 4973 | /* Return number of lines of text in window W, not counting the mode |
| 4974 | line and header line, if any. Do NOT use this for windows on GUI | ||
| 4975 | frames; use window_body_height instead. This function is only for | ||
| 4976 | windows on TTY frames, where it is much more efficient. */ | ||
| 4974 | 4977 | ||
| 4975 | int | 4978 | int |
| 4976 | window_internal_height (struct window *w) | 4979 | window_internal_height (struct window *w) |
| 4977 | { | 4980 | { |
| 4978 | int ht = w->total_lines; | 4981 | int ht = w->total_lines; |
| 4979 | 4982 | ||
| 4980 | if (!MINI_WINDOW_P (w)) | 4983 | if (window_wants_mode_line (w)) |
| 4981 | { | 4984 | --ht; |
| 4982 | if (!NILP (w->parent) | ||
| 4983 | || WINDOWP (w->contents) | ||
| 4984 | || !NILP (w->next) | ||
| 4985 | || !NILP (w->prev) | ||
| 4986 | || window_wants_mode_line (w)) | ||
| 4987 | --ht; | ||
| 4988 | 4985 | ||
| 4989 | if (window_wants_header_line (w)) | 4986 | if (window_wants_header_line (w)) |
| 4990 | --ht; | 4987 | --ht; |
| 4991 | } | ||
| 4992 | 4988 | ||
| 4993 | return ht; | 4989 | return ht; |
| 4994 | } | 4990 | } |
| @@ -5017,8 +5013,8 @@ window_scroll (Lisp_Object window, EMACS_INT n, bool whole, bool noerror) | |||
| 5017 | if (whole && Vfast_but_imprecise_scrolling) | 5013 | if (whole && Vfast_but_imprecise_scrolling) |
| 5018 | specbind (Qfontification_functions, Qnil); | 5014 | specbind (Qfontification_functions, Qnil); |
| 5019 | 5015 | ||
| 5020 | /* If we must, use the pixel-based version which is much slower than | 5016 | /* On GUI frames, use the pixel-based version which is much slower |
| 5021 | the line-based one but can handle varying line heights. */ | 5017 | than the line-based one but can handle varying line heights. */ |
| 5022 | if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame))) | 5018 | if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame))) |
| 5023 | window_scroll_pixel_based (window, n, whole, noerror); | 5019 | window_scroll_pixel_based (window, n, whole, noerror); |
| 5024 | else | 5020 | else |