diff options
| author | Po Lu | 2023-05-03 07:45:49 +0800 |
|---|---|---|
| committer | Po Lu | 2023-05-03 07:45:49 +0800 |
| commit | 9283471cb48e995f30985bd72b0b234ae6f513f3 (patch) | |
| tree | e185e55f0d9453e06576b05ed68fc133ff21faf6 /src | |
| parent | f4a5e6d0e5ce05cf97afb0ddb45dc0c0c2ea23a7 (diff) | |
| parent | fa33a14ebe56aa1726df9c8ad93106966c5b6eae (diff) | |
| download | emacs-9283471cb48e995f30985bd72b0b234ae6f513f3.tar.gz emacs-9283471cb48e995f30985bd72b0b234ae6f513f3.zip | |
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 8 | ||||
| -rw-r--r-- | src/treesit.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 14 | ||||
| -rw-r--r-- | src/xml.c | 10 |
4 files changed, 29 insertions, 7 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 19261ef79e8..1f214e1c9ee 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -3755,6 +3755,14 @@ update_window (struct window *w, bool force_p) | |||
| 3755 | } | 3755 | } |
| 3756 | } | 3756 | } |
| 3757 | 3757 | ||
| 3758 | /* If the window doesn't display its mode line, make sure the | ||
| 3759 | corresponding row of the current glyph matrix is disabled, so | ||
| 3760 | that if and when the mode line is displayed again, it will be | ||
| 3761 | cleared and completely redrawn. */ | ||
| 3762 | if (!window_wants_mode_line (w)) | ||
| 3763 | SET_MATRIX_ROW_ENABLED_P (w->current_matrix, | ||
| 3764 | w->current_matrix->nrows - 1, false); | ||
| 3765 | |||
| 3758 | /* Was display preempted? */ | 3766 | /* Was display preempted? */ |
| 3759 | paused_p = row < end; | 3767 | paused_p = row < end; |
| 3760 | 3768 | ||
diff --git a/src/treesit.c b/src/treesit.c index ef272fb8871..0af0e347694 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -3886,9 +3886,9 @@ syms_of_treesit (void) | |||
| 3886 | define_error (Qtreesit_parse_error, "Parse failed", | 3886 | define_error (Qtreesit_parse_error, "Parse failed", |
| 3887 | Qtreesit_error); | 3887 | Qtreesit_error); |
| 3888 | define_error (Qtreesit_range_invalid, | 3888 | define_error (Qtreesit_range_invalid, |
| 3889 | "RANGES are invalid, they have to be ordered and not overlapping", | 3889 | "RANGES are invalid: they have to be ordered and should not overlap", |
| 3890 | Qtreesit_error); | 3890 | Qtreesit_error); |
| 3891 | define_error (Qtreesit_buffer_too_large, "Buffer too large (> 4GB)", | 3891 | define_error (Qtreesit_buffer_too_large, "Buffer too large (> 4GiB)", |
| 3892 | Qtreesit_error); | 3892 | Qtreesit_error); |
| 3893 | define_error (Qtreesit_load_language_error, | 3893 | define_error (Qtreesit_load_language_error, |
| 3894 | "Cannot load language definition", | 3894 | "Cannot load language definition", |
diff --git a/src/xdisp.c b/src/xdisp.c index 96fb040baa4..85aec3639dd 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -20662,6 +20662,8 @@ try_window (Lisp_Object window, struct text_pos pos, int flags) | |||
| 20662 | int bot_scroll_margin = top_scroll_margin; | 20662 | int bot_scroll_margin = top_scroll_margin; |
| 20663 | if (window_wants_header_line (w)) | 20663 | if (window_wants_header_line (w)) |
| 20664 | top_scroll_margin += CURRENT_HEADER_LINE_HEIGHT (w); | 20664 | top_scroll_margin += CURRENT_HEADER_LINE_HEIGHT (w); |
| 20665 | if (window_wants_tab_line (w)) | ||
| 20666 | top_scroll_margin += CURRENT_TAB_LINE_HEIGHT (w); | ||
| 20665 | start_display (&it, w, pos); | 20667 | start_display (&it, w, pos); |
| 20666 | 20668 | ||
| 20667 | if ((w->cursor.y >= 0 | 20669 | if ((w->cursor.y >= 0 |
| @@ -22006,17 +22008,23 @@ try_window_id (struct window *w) | |||
| 22006 | 22008 | ||
| 22007 | /* Don't let the cursor end in the scroll margins. */ | 22009 | /* Don't let the cursor end in the scroll margins. */ |
| 22008 | { | 22010 | { |
| 22009 | int this_scroll_margin = window_scroll_margin (w, MARGIN_IN_PIXELS); | 22011 | int top_scroll_margin = window_scroll_margin (w, MARGIN_IN_PIXELS); |
| 22012 | int bot_scroll_margin = top_scroll_margin; | ||
| 22010 | int cursor_height = MATRIX_ROW (w->desired_matrix, w->cursor.vpos)->height; | 22013 | int cursor_height = MATRIX_ROW (w->desired_matrix, w->cursor.vpos)->height; |
| 22011 | 22014 | ||
| 22012 | if ((w->cursor.y < this_scroll_margin | 22015 | if (window_wants_header_line (w)) |
| 22016 | top_scroll_margin += CURRENT_HEADER_LINE_HEIGHT (w); | ||
| 22017 | if (window_wants_tab_line (w)) | ||
| 22018 | top_scroll_margin += CURRENT_TAB_LINE_HEIGHT (w); | ||
| 22019 | |||
| 22020 | if ((w->cursor.y < top_scroll_margin | ||
| 22013 | && CHARPOS (start) > BEGV) | 22021 | && CHARPOS (start) > BEGV) |
| 22014 | /* Old redisplay didn't take scroll margin into account at the bottom, | 22022 | /* Old redisplay didn't take scroll margin into account at the bottom, |
| 22015 | but then global-hl-line-mode doesn't scroll. KFS 2004-06-14 */ | 22023 | but then global-hl-line-mode doesn't scroll. KFS 2004-06-14 */ |
| 22016 | || (w->cursor.y | 22024 | || (w->cursor.y |
| 22017 | + (cursor_row_fully_visible_p (w, false, true, true) | 22025 | + (cursor_row_fully_visible_p (w, false, true, true) |
| 22018 | ? 1 | 22026 | ? 1 |
| 22019 | : cursor_height + this_scroll_margin)) > it.last_visible_y) | 22027 | : cursor_height + bot_scroll_margin)) > it.last_visible_y) |
| 22020 | { | 22028 | { |
| 22021 | w->cursor.vpos = -1; | 22029 | w->cursor.vpos = -1; |
| 22022 | clear_glyph_matrix (w->desired_matrix); | 22030 | clear_glyph_matrix (w->desired_matrix); |
| @@ -280,7 +280,10 @@ DEFUN ("libxml-parse-html-region", Flibxml_parse_html_region, | |||
| 280 | If START is nil, it defaults to `point-min'. If END is nil, it | 280 | If START is nil, it defaults to `point-min'. If END is nil, it |
| 281 | defaults to `point-max'. | 281 | defaults to `point-max'. |
| 282 | 282 | ||
| 283 | If BASE-URL is non-nil, it is used to expand relative URLs. | 283 | If BASE-URL is non-nil, it is used if and when reporting errors and |
| 284 | warnings from the underlying libxml2 library. Currently, errors and | ||
| 285 | warnings from the library are suppressed, so this argument is largely | ||
| 286 | ignored. | ||
| 284 | 287 | ||
| 285 | If you want comments to be stripped, use the `xml-remove-comments' | 288 | If you want comments to be stripped, use the `xml-remove-comments' |
| 286 | function to strip comments before calling this function. */) | 289 | function to strip comments before calling this function. */) |
| @@ -298,7 +301,10 @@ DEFUN ("libxml-parse-xml-region", Flibxml_parse_xml_region, | |||
| 298 | If START is nil, it defaults to `point-min'. If END is nil, it | 301 | If START is nil, it defaults to `point-min'. If END is nil, it |
| 299 | defaults to `point-max'. | 302 | defaults to `point-max'. |
| 300 | 303 | ||
| 301 | If BASE-URL is non-nil, it is used to expand relative URLs. | 304 | If BASE-URL is non-nil, it is used if and when reporting errors and |
| 305 | warnings from the underlying libxml2 library. Currently, errors and | ||
| 306 | warnings from the library are suppressed, so this argument is largely | ||
| 307 | ignored. | ||
| 302 | 308 | ||
| 303 | If you want comments to be stripped, use the `xml-remove-comments' | 309 | If you want comments to be stripped, use the `xml-remove-comments' |
| 304 | function to strip comments before calling this function. */) | 310 | function to strip comments before calling this function. */) |