From: Eli Zaretskii Date: Fri, 24 Jun 2022 07:44:44 +0000 (+0300) Subject: Merge branch 'abort-redisplay' X-Git-Tag: emacs-29.0.90~1447^2~1506 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=289b457cac1439ac5f9bb6ce1143d91b8d52da91;p=emacs.git Merge branch 'abort-redisplay' This allows abandoning the redisplay of a window that takes too long to complete. Bug#45898 * src/xdisp.c (update_redisplay_ticks): New function. (init_iterator, set_iterator_to_next): Call 'update_redisplay_ticks'. (syms_of_xdisp) : New variable. : Remove 'void-variable': it is no longer needed, since 'calc_pixel_width_or_height' can no longer signal a void-variable error, and it gets in the way of aborting redisplay via 'redisplay_window_error'. * src/keyboard.c (command_loop_1): Reinitialize the tick count before executing each command in the loop. * src/syntax.c (scan_sexps_forward): Call 'update_redisplay_ticks' after finishing the loop. * src/dispnew.c (make_current): Make sure enabled rows of the current matrix have a valid hash, even if redisplay of a window was aborted due to slowness. This avoids assertion violations in 'scrolling_window' due to the wrong hash value. * src/xdisp.c (display_working_on_window_p): New global variable. (unwind_display_working_on_window): New function. * src/keyboard.c (command_loop_1): Reset 'display_working_on_window_p' before and after executing commands. * src/window.c (Frecenter, window_scroll, displayed_window_lines): * src/indent.c (Fvertical_motion): Set 'display_working_on_window_p' before calling 'start_display'. * src/syntax.c (scan_sexps_forward): Call 'update_redisplay_ticks' after finishing the loop. * src/regex-emacs.c (re_match_2_internal): * src/bidi.c (bidi_find_bracket_pairs, bidi_fetch_char) (bidi_paragraph_init, bidi_find_other_level_edge): Update the redisplay tick count as appropriate, when moving the iterator by one character position actually requires to examine many more positions. * src/xdisp.c (redisplay_window_error): Show messages about aborted redisplay of a window as delayed-warnings. * doc/emacs/trouble.texi (DEL Does Not Delete): Move to the end of the chapter. This issue is no longer frequent or important as it was back in Emacs 20 days. (Long Lines): Document 'max-redisplay-ticks'. * doc/emacs/emacs.texi (Top): Update the detailed menu. * etc/NEWS: Announce 'max-redisplay-ticks'. --- 289b457cac1439ac5f9bb6ce1143d91b8d52da91