diff options
| author | Eli Zaretskii | 2014-08-17 17:48:50 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-08-17 17:48:50 +0300 |
| commit | 93e8e44e6f5f4a7fa4a1643c7871c0bf9427d7d8 (patch) | |
| tree | 02538f049168a990d888f054cf57fc772baa4d46 /src | |
| parent | f7abe0af306f08ab225815adf28fecf7856befe7 (diff) | |
| download | emacs-93e8e44e6f5f4a7fa4a1643c7871c0bf9427d7d8.tar.gz emacs-93e8e44e6f5f4a7fa4a1643c7871c0bf9427d7d8.zip | |
Avoid inflooping in redisplay caused by hscrolled R2L lines.
src/xdisp.c (display_line): Don't assume that the call to
reseat_at_next_visible_line_start ends up at a character
immediately following the newline on the previous line. Avoids
setting the ends_at_zv_p flag on screen lines that are not at or
beyond ZV, which causes infloop in redisplay. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 68f6babb991..8c89f693bca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2014-08-17 Eli Zaretskii <eliz@gnu.org> | 1 | 2014-08-17 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (display_line): Don't assume that the call to | ||
| 4 | reseat_at_next_visible_line_start ends up at a character | ||
| 5 | immediately following the newline on the previous line. Avoids | ||
| 6 | setting the ends_at_zv_p flag on screen lines that are not at or | ||
| 7 | beyond ZV, which causes infloop in redisplay. For the details, see | ||
| 8 | http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html. | ||
| 9 | |||
| 3 | * dispnew.c (buffer_posn_from_coords): Fix mirroring of X | 10 | * dispnew.c (buffer_posn_from_coords): Fix mirroring of X |
| 4 | coordinate for hscrolled R2L screen lines. (Bug#18277) | 11 | coordinate for hscrolled R2L screen lines. (Bug#18277) |
| 5 | 12 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 776e4d000ee..e60a9d341c6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -20583,10 +20583,15 @@ display_line (struct it *it) | |||
| 20583 | row->truncated_on_right_p = 1; | 20583 | row->truncated_on_right_p = 1; |
| 20584 | it->continuation_lines_width = 0; | 20584 | it->continuation_lines_width = 0; |
| 20585 | reseat_at_next_visible_line_start (it, 0); | 20585 | reseat_at_next_visible_line_start (it, 0); |
| 20586 | if (IT_BYTEPOS (*it) <= BEG_BYTE) | 20586 | /* We insist below that IT's position be at ZV because in |
| 20587 | row->ends_at_zv_p = true; | 20587 | bidi-reordered lines the character at visible line start |
| 20588 | might not be the character that follows the newline in | ||
| 20589 | the logical order. */ | ||
| 20590 | if (IT_BYTEPOS (*it) > BEG_BYTE) | ||
| 20591 | row->ends_at_zv_p = | ||
| 20592 | IT_BYTEPOS (*it) >= ZV_BYTE && FETCH_BYTE (ZV_BYTE - 1) != '\n'; | ||
| 20588 | else | 20593 | else |
| 20589 | row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n'; | 20594 | row->ends_at_zv_p = false; |
| 20590 | break; | 20595 | break; |
| 20591 | } | 20596 | } |
| 20592 | } | 20597 | } |