diff options
| author | Eli Zaretskii | 2011-10-17 21:13:44 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2011-10-17 21:13:44 +0200 |
| commit | f2ff9e88941024ca1ca03f8ea1404536bc3c1475 (patch) | |
| tree | 9e69e3efe9d04915f49f4b81c3cfc259a45204a5 | |
| parent | 0bc0638017ff5ddcfc4ba2467d7fa2d291583551 (diff) | |
| download | emacs-f2ff9e88941024ca1ca03f8ea1404536bc3c1475.tar.gz emacs-f2ff9e88941024ca1ca03f8ea1404536bc3c1475.zip | |
Fix part 1 of bug #9771 with assertion violation in move_it_by_lines.
src/xdisp.c (move_it_vertically_backward): Don't look for character position
immediately after the newline when in a continuation line.
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xdisp.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 53e67a30c38..07b0418b399 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,9 @@ | |||
| 3 | * xdisp.c (push_display_prop): Determine whether to record string | 3 | * xdisp.c (push_display_prop): Determine whether to record string |
| 4 | or buffer position by IT->string, not by IT->method. Allow | 4 | or buffer position by IT->string, not by IT->method. Allow |
| 5 | GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4) | 5 | GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4) |
| 6 | (move_it_vertically_backward): Don't look for character position | ||
| 7 | immediately after the newline when in a continuation line. | ||
| 8 | (Bug#9771, part 1) | ||
| 6 | 9 | ||
| 7 | 2011-10-15 Martin Rudalics <rudalics@gmx.at> | 10 | 2011-10-15 Martin Rudalics <rudalics@gmx.at> |
| 8 | 11 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index e796eb98f19..43907ccc03a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8768,7 +8768,10 @@ move_it_vertically_backward (struct it *it, int dy) | |||
| 8768 | reordering. We want to get to the character position | 8768 | reordering. We want to get to the character position |
| 8769 | that is immediately after the newline of the previous | 8769 | that is immediately after the newline of the previous |
| 8770 | line. */ | 8770 | line. */ |
| 8771 | if (it->bidi_p && IT_CHARPOS (*it) > BEGV | 8771 | if (it->bidi_p |
| 8772 | && !it->continuation_lines_width | ||
| 8773 | && !STRINGP (it->string) | ||
| 8774 | && IT_CHARPOS (*it) > BEGV | ||
| 8772 | && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n') | 8775 | && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n') |
| 8773 | { | 8776 | { |
| 8774 | EMACS_INT nl_pos = | 8777 | EMACS_INT nl_pos = |