aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 5f438152341..aa10abeb191 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3407,7 +3407,8 @@ init_to_row_start (struct it *it, struct window *w, struct glyph_row *row)
3407/* Initialize IT for stepping through current_buffer in window W 3407/* Initialize IT for stepping through current_buffer in window W
3408 starting in the line following ROW, i.e. starting at ROW->end. 3408 starting in the line following ROW, i.e. starting at ROW->end.
3409 Value is false if there are overlay strings with newlines at ROW's 3409 Value is false if there are overlay strings with newlines at ROW's
3410 end position. */ 3410 end position, or if the following row begins with bidi-reordered
3411 characters that could be composed. */
3411 3412
3412static bool 3413static bool
3413init_to_row_end (struct it *it, struct window *w, struct glyph_row *row) 3414init_to_row_end (struct it *it, struct window *w, struct glyph_row *row)
@@ -3420,7 +3421,20 @@ init_to_row_end (struct it *it, struct window *w, struct glyph_row *row)
3420 it->continuation_lines_width 3421 it->continuation_lines_width
3421 = row->continuation_lines_width + row->pixel_width; 3422 = row->continuation_lines_width + row->pixel_width;
3422 CHECK_IT (it); 3423 CHECK_IT (it);
3423 success = true; 3424 /* Initializing IT in the presense of compositions in reordered
3425 rows is tricky: row->end above will generally cause us to
3426 start at position that is not the first one in the logical
3427 order, and we might therefore miss the composition earlier in
3428 the buffer that affects how glypsh are laid out in this row.
3429 So we punt instead. Note: the test below works because
3430 get_next_display_element calls get_visually_first_element,
3431 which calls composition_compute_stop_pos, which populates
3432 it->cmp_it. */
3433 if (get_next_display_element (it)
3434 && (it->bidi_it.scan_dir == -1 && it->cmp_it.id >= 0))
3435 success = false;
3436 else
3437 success = true;
3424 } 3438 }
3425 3439
3426 return success; 3440 return success;