[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 264472a507 05/14: Handle W = NULL in 'update_redisplay_ticks'
From: |
Eli Zaretskii |
Subject: |
master 264472a507 05/14: Handle W = NULL in 'update_redisplay_ticks' |
Date: |
Fri, 24 Jun 2022 03:54:18 -0400 (EDT) |
branch: master
commit 264472a507ea275476eef5a80ee630aa007434f1
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Handle W = NULL in 'update_redisplay_ticks'
* src/xdisp.c (update_redisplay_ticks): If W == NULL, assume we
are iterating the current buffer.
---
src/xdisp.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index ae428f4b40..d14955af41 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17179,7 +17179,11 @@ redisplay_window_1 (Lisp_Object window)
means to initialize the tick count to zero.
W can be NULL if TICKS is zero: that means unconditionally
- re-initialize the current tick count to zero. */
+ re-initialize the current tick count to zero.
+
+ W can also be NULL if the caller doesn't know which window is being
+ processed by the display code. In that case, if TICKS is non-zero,
+ we assume it's the last window that shows the current buffer. */
void
update_redisplay_ticks (int ticks, struct window *w)
{
@@ -17204,9 +17208,11 @@ update_redisplay_ticks (int ticks, struct window *w)
the one used for the native tool bar). */
Lisp_Object contents = w ? w->contents : Qnil;
char *bufname =
- BUFFERP (contents)
- ? SSDATA (BVAR (XBUFFER (contents), name))
- : (char *) "<none>";
+ NILP (contents)
+ ? SSDATA (BVAR (current_buffer, name))
+ : (BUFFERP (contents)
+ ? SSDATA (BVAR (XBUFFER (contents), name))
+ : (char *) "<unknown>");
windows_or_buffers_changed = 177;
error ("Window showing buffer %s takes too long to redisplay", bufname);
- Re: master e1e0315252 01/14: Initial implementation of "abort-redisplay" feature, (continued)
- Re: master e1e0315252 01/14: Initial implementation of "abort-redisplay" feature, Lars Ingebrigtsen, 2022/06/24
- Re: master e1e0315252 01/14: Initial implementation of "abort-redisplay" feature, Eli Zaretskii, 2022/06/24
- Re: master e1e0315252 01/14: Initial implementation of "abort-redisplay" feature, Lars Ingebrigtsen, 2022/06/24
- Re: master e1e0315252 01/14: Initial implementation of "abort-redisplay" feature, Eli Zaretskii, 2022/06/24
- Re: master e1e0315252 01/14: Initial implementation of "abort-redisplay" feature, Lars Ingebrigtsen, 2022/06/24
master f1e1392868 03/14: Change the API of 'update_redisplay_ticks', Eli Zaretskii, 2022/06/24
master 82626e62ab 08/14: Allow aborting redisplay stuck in 'parse-partial-sexp', Eli Zaretskii, 2022/06/24
master a82af5ae78 09/14: Don't count ticks too eagerly in syntax.c, Eli Zaretskii, 2022/06/24
master 5a596bbed5 02/14: Fix a typo in a doc string., Eli Zaretskii, 2022/06/24
master bd44f39d6d 04/14: Restart tick counting every command, Eli Zaretskii, 2022/06/24
master 264472a507 05/14: Handle W = NULL in 'update_redisplay_ticks',
Eli Zaretskii <=
master b89b23079c 12/14: Show warnings about aborted redisplay, Eli Zaretskii, 2022/06/24
master 287e714fe0 11/14: Update redisplay ticks for more operations, and misc modifications, Eli Zaretskii, 2022/06/24
master 94e1185369 06/14: Support callers which sometimes run unrelated to display code, Eli Zaretskii, 2022/06/24
master 94672c2936 07/14: Handle too long syntactic fontifications, Eli Zaretskii, 2022/06/24
master 4b00bc47c7 10/14: Update documentation, Eli Zaretskii, 2022/06/24
master 289b457cac 14/14: Merge branch 'abort-redisplay', Eli Zaretskii, 2022/06/24
master 6fcd8ca743 13/14: ; * etc/NEWS: Minor update of description of 'max-redisplay-ticks'., Eli Zaretskii, 2022/06/24