[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/gnus-select cbea6b1 145/218: Avoid redisplay probl
From: |
Andrew G Cohen |
Subject: |
[Emacs-diffs] feature/gnus-select cbea6b1 145/218: Avoid redisplay problems with too wide wrap-prefix |
Date: |
Fri, 14 Dec 2018 03:35:18 -0500 (EST) |
branch: feature/gnus-select
commit cbea6b19f41b3aa74f405f9846e04968a5426d16
Author: Eli Zaretskii <address@hidden>
Commit: Andrew G Cohen <address@hidden>
Avoid redisplay problems with too wide wrap-prefix
* src/xdisp.c (display_line): Avoid looping in redisplay when
wrap-prefix is set to a too-wide stretch of whitespace.
(Bug#30432)
---
src/xdisp.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 4778f53..df5335e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21969,9 +21969,24 @@ display_line (struct it *it, int cursor_vpos)
break;
}
+ /* Detect overly-wide wrap-prefixes made of (space ...) display
+ properties. When such a wrap prefix reaches past the right
+ margin of the window, we need to avoid the call to
+ set_iterator_to_next below, so that it->line_wrap is left at
+ its TRUNCATE value wisely set by handle_line_prefix.
+ Otherwise, set_iterator_to_next will pop the iterator stack,
+ restore it->line_wrap, and redisplay might infloop. */
+ bool overwide_wrap_prefix =
+ CONSP (it->object) && EQ (XCAR (it->object), Qspace)
+ && it->sp > 0 && it->method == GET_FROM_STRETCH
+ && it->current_x >= it->last_visible_x
+ && it->continuation_lines_width > 0
+ && it->line_wrap == TRUNCATE && it->stack[0].line_wrap != TRUNCATE;
+
/* Proceed with next display element. Note that this skips
over lines invisible because of selective display. */
- set_iterator_to_next (it, true);
+ if (!overwide_wrap_prefix)
+ set_iterator_to_next (it, true);
/* If we truncate lines, we are done when the last displayed
glyphs reach past the right margin of the window. */
- [Emacs-diffs] feature/gnus-select b3c36c4 122/218: Revert move of interactive `transpose-regions' to Lisp, (continued)
- [Emacs-diffs] feature/gnus-select b3c36c4 122/218: Revert move of interactive `transpose-regions' to Lisp, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 24e07c4 129/218: Tune time zone 0, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a3605b6 130/218: * test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals): New., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 15d031e 128/218: * doc/emacs/building.texi (Starting GUD): Mention 'guiler'., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select c5dd420 112/218: Move interactive `transpose-regions' to Lisp, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select abe37f8 127/218: Yet more proofreading of the Emacs manual, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 98cca72 140/218: Better support for 'transpose-chars' in Flyspell mode, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select f1168aa 139/218: Correct Info link markup, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a5db603 137/218: Minor improvements in building.texi, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 7325e18 146/218: * cc-engine.el (c-looking-at-or-maybe-in-bracelist): Remove pessimization, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select cbea6b1 145/218: Avoid redisplay problems with too wide wrap-prefix,
Andrew G Cohen <=
- [Emacs-diffs] feature/gnus-select 3b5438f 148/218: Revert "Support all perl variable declarators and prefixes", Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e31b277 152/218: * lisp/play/fortune.el (fortune-in-buffer): Unadvertise no-op arg., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 246460c 155/218: Add tests for Bug#30408, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select d219c99 143/218: Autoupdate from Gnulib, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b6d216c 169/218: Tag tramp-test39-utf8* as :unstable, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select b74e19e 159/218: * lisp/play/fortune.el (fortune-in-buffer): Revert previous nonsense., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select e3bcd11 160/218: Port data-tests-popcnt to 32-bit Emacs, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 19ed176 149/218: Improvements in dired.texi, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 5f36db7 167/218: Improve warning and error messages, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 0bf81e2 174/218: ; Fix last commit in tramp.el, Andrew G Cohen, 2018/12/14