diff options
| author | Joakim Verona | 2011-08-09 09:20:14 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-08-09 09:20:14 +0200 |
| commit | 1e26d437b871eb5aacaf18a85fba928ef8ea25be (patch) | |
| tree | 53d06e7a5bca07e155475c55ebbd9f48d2847efc /src/xdisp.c | |
| parent | 301cce3b507f4d56b3182c15b5d741582c991e4c (diff) | |
| parent | 839dde57161c56f03ec4fbcba9e1b26d0924b8fd (diff) | |
| download | emacs-1e26d437b871eb5aacaf18a85fba928ef8ea25be.tar.gz emacs-1e26d437b871eb5aacaf18a85fba928ef8ea25be.zip | |
merge upstream.
Diffstat (limited to 'src/xdisp.c')
| -rw-r--r-- | src/xdisp.c | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index d4f53012763..b09a1547a57 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5567,19 +5567,42 @@ forward_to_next_line_start (struct it *it, int *skipped_p, | |||
| 5567 | 5567 | ||
| 5568 | xassert (!STRINGP (it->string)); | 5568 | xassert (!STRINGP (it->string)); |
| 5569 | 5569 | ||
| 5570 | /* If we are not bidi-reordering, and there isn't any `display' | 5570 | /* If there isn't any `display' property in sight, and no |
| 5571 | property in sight, and no overlays, we can just use the | 5571 | overlays, we can just use the position of the newline in |
| 5572 | position of the newline in buffer text. */ | 5572 | buffer text. */ |
| 5573 | if (!it->bidi_p | 5573 | if (it->stop_charpos >= limit |
| 5574 | && (it->stop_charpos >= limit | 5574 | || ((pos = Fnext_single_property_change (make_number (start), |
| 5575 | || ((pos = Fnext_single_property_change (make_number (start), | 5575 | Qdisplay, Qnil, |
| 5576 | Qdisplay, Qnil, | 5576 | make_number (limit)), |
| 5577 | make_number (limit)), | 5577 | NILP (pos)) |
| 5578 | NILP (pos)) | 5578 | && next_overlay_change (start) == ZV)) |
| 5579 | && next_overlay_change (start) == ZV))) | 5579 | { |
| 5580 | { | 5580 | if (!it->bidi_p) |
| 5581 | IT_CHARPOS (*it) = limit; | 5581 | { |
| 5582 | IT_BYTEPOS (*it) = CHAR_TO_BYTE (limit); | 5582 | IT_CHARPOS (*it) = limit; |
| 5583 | IT_BYTEPOS (*it) = CHAR_TO_BYTE (limit); | ||
| 5584 | } | ||
| 5585 | else | ||
| 5586 | { | ||
| 5587 | struct bidi_it bprev; | ||
| 5588 | |||
| 5589 | /* Help bidi.c avoid expensive searches for display | ||
| 5590 | properties and overlays, by telling it that there are | ||
| 5591 | none up to `limit'. */ | ||
| 5592 | if (it->bidi_it.disp_pos < limit) | ||
| 5593 | { | ||
| 5594 | it->bidi_it.disp_pos = limit; | ||
| 5595 | it->bidi_it.disp_prop_p = 0; | ||
| 5596 | } | ||
| 5597 | do { | ||
| 5598 | bprev = it->bidi_it; | ||
| 5599 | bidi_move_to_visually_next (&it->bidi_it); | ||
| 5600 | } while (it->bidi_it.charpos != limit); | ||
| 5601 | IT_CHARPOS (*it) = limit; | ||
| 5602 | IT_BYTEPOS (*it) = it->bidi_it.bytepos; | ||
| 5603 | if (bidi_it_prev) | ||
| 5604 | *bidi_it_prev = bprev; | ||
| 5605 | } | ||
| 5583 | *skipped_p = newline_found_p = 1; | 5606 | *skipped_p = newline_found_p = 1; |
| 5584 | } | 5607 | } |
| 5585 | else | 5608 | else |