summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2015-08-01 15:32:48 +0300
committerEli Zaretskii <eliz@gnu.org>2015-08-01 15:32:48 +0300
commit08d65696c947b09d4c32606f279c3c2594e99e16 (patch)
tree63f968c71a978ded0366a33a076db49b06ed38bb
parentbdd370bb5bd63139870b69775fd0bdfeeb81d5b5 (diff)
downloademacs-08d65696c947b09d4c32606f279c3c2594e99e16.tar.gz
Prevent incorrect display when 'line-spacing' variable is set
* src/xdisp.c (try_window_id): Give up this optimization if the buffer has its 'line-spacing' variable set non-nil.
-rw-r--r--src/xdisp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 03b03d06b3e..e45cb8702b2 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17753,7 +17753,7 @@ try_window_id (struct window *w)
#if false
#define GIVE_UP(X) \
do { \
- fprintf (stderr, "try_window_id give up %d\n", (X)); \
+ TRACE ((stderr, "try_window_id give up %d\n", (X))); \
return 0; \
} while (false)
#else
@@ -17775,7 +17775,7 @@ try_window_id (struct window *w)
changed in the buffer displayed by the window, so give up if they
have. */
if (w->last_overlay_modified != OVERLAY_MODIFF)
- GIVE_UP (21);
+ GIVE_UP (200);
/* Verify that narrowing has not changed.
Also verify that we were not told to prevent redisplay optimizations.
@@ -17835,6 +17835,11 @@ try_window_id (struct window *w)
&& NILP (BVAR (XBUFFER (w->contents), bidi_paragraph_direction)))
GIVE_UP (22);
+ /* Give up if the buffer has line-spacing set, as Lisp-level changes
+ to that variable require thorough redisplay. */
+ if (!NILP (BVAR (XBUFFER (w->contents), extra_line_spacing)))
+ GIVE_UP (23);
+
/* Make sure beg_unchanged and end_unchanged are up to date. Do it
only if buffer has really changed. The reason is that the gap is
initially at Z for freshly visited files. The code below would