aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2020-07-07 07:50:40 -0700
committerGlenn Morris2020-07-07 07:50:40 -0700
commit1a850f4b20d11938d68270147d3d5ebc3c4899f4 (patch)
tree3e4ab78fee6ab194e80ff6babcacd9fee80155b8 /src
parent1e3f94fad4015bec982dd172800483ba170ccbb5 (diff)
parent71fc003860043487534379ceeaa61ac4a7617756 (diff)
downloademacs-1a850f4b20d11938d68270147d3d5ebc3c4899f4.tar.gz
emacs-1a850f4b20d11938d68270147d3d5ebc3c4899f4.zip
Merge from origin/emacs-27
71fc003860 (origin/emacs-27) Avoid infloop in 'format-mode-line' 247dcb4b1b Clarify the documentation of 'left/right-fringe' display spec d453cee177 Minor improvement in ELisp manual 3c778c443c * doc/misc/tramp.texi (Customizing Methods): Fix typo.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 92afcccd388..97c55cdf5b8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -26385,6 +26385,22 @@ decode_mode_spec (struct window *w, register int c, int field_width,
26385 startpos = marker_position (w->start); 26385 startpos = marker_position (w->start);
26386 startpos_byte = marker_byte_position (w->start); 26386 startpos_byte = marker_byte_position (w->start);
26387 height = WINDOW_TOTAL_LINES (w); 26387 height = WINDOW_TOTAL_LINES (w);
26388 /* We cannot cope with w->start being outside of the
26389 accessible portion of the buffer; in particular,
26390 display_count_lines call below will infloop if called with
26391 startpos_byte outside of the [BEGV_BYTE..ZV_BYTE] region.
26392 Such w->start means we were called in some "creative" way
26393 when the buffer's restriction was changed, but the window
26394 wasn't yet redisplayed after that. If that happens, we
26395 need to determine a new base line. */
26396 if (!(BUF_BEGV_BYTE (b) <= startpos_byte
26397 && startpos_byte <= BUF_ZV_BYTE (b)))
26398 {
26399 startpos = BUF_BEGV (b);
26400 startpos_byte = BUF_BEGV_BYTE (b);
26401 w->base_line_pos = 0;
26402 w->base_line_number = 0;
26403 }
26388 26404
26389 /* If we decided that this buffer isn't suitable for line numbers, 26405 /* If we decided that this buffer isn't suitable for line numbers,
26390 don't forget that too fast. */ 26406 don't forget that too fast. */