diff options
| author | Eli Zaretskii | 2010-04-25 22:33:31 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2010-04-25 22:33:31 +0300 |
| commit | 7482731ab522e6c0667fcf1b60bc9b5c1ba6ffca (patch) | |
| tree | 05aa4fdbe2e82c337d789bcab86c6eb5c38f3175 /src | |
| parent | f538fcec9abe33859fe4b7d84ea1d5a07d476469 (diff) | |
| download | emacs-7482731ab522e6c0667fcf1b60bc9b5c1ba6ffca.tar.gz emacs-7482731ab522e6c0667fcf1b60bc9b5c1ba6ffca.zip | |
Start fixing cursor positioning in bidi buffers with display properties.
xdisp.c (set_cursor_from_row): Don't return zero if cursor was
found by `cursor' property of a display string.
(display_line): Preserve overlay and string info in row->end.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 58fdad2d1d2..9cabe8de38b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2010-04-25 Eli Zaretskii <eliz@gnu.org> | 1 | 2010-04-25 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (set_cursor_from_row): Don't return zero if cursor was | ||
| 4 | found by `cursor' property of a display string. | ||
| 5 | (display_line): Preserve overlay and string info in row->end. | ||
| 6 | |||
| 7 | 2010-04-25 Eli Zaretskii <eliz@gnu.org> | ||
| 8 | |||
| 3 | * xdisp.c (display_line): Fix crash with bidi display on the last | 9 | * xdisp.c (display_line): Fix crash with bidi display on the last |
| 4 | empty line. (Bug#6030) | 10 | empty line. (Bug#6030) |
| 5 | (iterate_out_of_display_property): New function, body from pop_it. | 11 | (iterate_out_of_display_property): New function, body from pop_it. |
diff --git a/src/xdisp.c b/src/xdisp.c index 4834b61a626..d491d5a9aeb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -13055,7 +13055,8 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) | |||
| 13055 | 13055 | ||
| 13056 | /* If we reached the end of the line, and END was from a string, | 13056 | /* If we reached the end of the line, and END was from a string, |
| 13057 | the cursor is not on this line. */ | 13057 | the cursor is not on this line. */ |
| 13058 | if (glyph == end | 13058 | if (cursor == NULL |
| 13059 | && glyph == end | ||
| 13059 | && STRINGP ((glyph - incr)->object) | 13060 | && STRINGP ((glyph - incr)->object) |
| 13060 | && row->continued_p) | 13061 | && row->continued_p) |
| 13061 | return 0; | 13062 | return 0; |
| @@ -17969,7 +17970,6 @@ display_line (it) | |||
| 17969 | in the logical order, unless we are at ZV. */ | 17970 | in the logical order, unless we are at ZV. */ |
| 17970 | if (row->ends_at_zv_p) | 17971 | if (row->ends_at_zv_p) |
| 17971 | { | 17972 | { |
| 17972 | row_end = row->end = it->current; | ||
| 17973 | if (!row->used[TEXT_AREA]) | 17973 | if (!row->used[TEXT_AREA]) |
| 17974 | { | 17974 | { |
| 17975 | row->start.pos.charpos = row_end.pos.charpos; | 17975 | row->start.pos.charpos = row_end.pos.charpos; |
| @@ -18019,6 +18019,9 @@ display_line (it) | |||
| 18019 | it->eol_pos.charpos = it->eol_pos.bytepos = 0; | 18019 | it->eol_pos.charpos = it->eol_pos.bytepos = 0; |
| 18020 | } | 18020 | } |
| 18021 | *it = save_it; | 18021 | *it = save_it; |
| 18022 | row_end.string_pos = it->current.string_pos; | ||
| 18023 | row_end.overlay_string_index = it->current.overlay_string_index; | ||
| 18024 | row_end.dpvec_index = it->current.dpvec_index; | ||
| 18022 | row->end = row_end; | 18025 | row->end = row_end; |
| 18023 | } | 18026 | } |
| 18024 | } | 18027 | } |