aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2023-05-03 07:45:49 +0800
committerPo Lu2023-05-03 07:45:49 +0800
commit9283471cb48e995f30985bd72b0b234ae6f513f3 (patch)
treee185e55f0d9453e06576b05ed68fc133ff21faf6 /src
parentf4a5e6d0e5ce05cf97afb0ddb45dc0c0c2ea23a7 (diff)
parentfa33a14ebe56aa1726df9c8ad93106966c5b6eae (diff)
downloademacs-9283471cb48e995f30985bd72b0b234ae6f513f3.tar.gz
emacs-9283471cb48e995f30985bd72b0b234ae6f513f3.zip
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c8
-rw-r--r--src/treesit.c4
-rw-r--r--src/xdisp.c14
-rw-r--r--src/xml.c10
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);
diff --git a/src/xml.c b/src/xml.c
index b55ac62cdd3..b4c849e6a65 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -280,7 +280,10 @@ DEFUN ("libxml-parse-html-region", Flibxml_parse_html_region,
280If START is nil, it defaults to `point-min'. If END is nil, it 280If START is nil, it defaults to `point-min'. If END is nil, it
281defaults to `point-max'. 281defaults to `point-max'.
282 282
283If BASE-URL is non-nil, it is used to expand relative URLs. 283If BASE-URL is non-nil, it is used if and when reporting errors and
284warnings from the underlying libxml2 library. Currently, errors and
285warnings from the library are suppressed, so this argument is largely
286ignored.
284 287
285If you want comments to be stripped, use the `xml-remove-comments' 288If you want comments to be stripped, use the `xml-remove-comments'
286function to strip comments before calling this function. */) 289function to strip comments before calling this function. */)
@@ -298,7 +301,10 @@ DEFUN ("libxml-parse-xml-region", Flibxml_parse_xml_region,
298If START is nil, it defaults to `point-min'. If END is nil, it 301If START is nil, it defaults to `point-min'. If END is nil, it
299defaults to `point-max'. 302defaults to `point-max'.
300 303
301If BASE-URL is non-nil, it is used to expand relative URLs. 304If BASE-URL is non-nil, it is used if and when reporting errors and
305warnings from the underlying libxml2 library. Currently, errors and
306warnings from the library are suppressed, so this argument is largely
307ignored.
302 308
303If you want comments to be stripped, use the `xml-remove-comments' 309If you want comments to be stripped, use the `xml-remove-comments'
304function to strip comments before calling this function. */) 310function to strip comments before calling this function. */)