diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 16 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cb54bbd0e70..1e6bdcb4999 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-05-21 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion: | ||
| 4 | when closest_pos is identical to to_charpos, don't recurse, since | ||
| 5 | we already tried that, and failed. (Bug#17539) | ||
| 6 | |||
| 1 | 2014-05-20 Eli Zaretskii <eliz@gnu.org> | 7 | 2014-05-20 Eli Zaretskii <eliz@gnu.org> |
| 2 | 8 | ||
| 3 | * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are | 9 | * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are |
diff --git a/src/xdisp.c b/src/xdisp.c index 88d61a6bbc0..e9c3cb1aac6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8812,8 +8812,11 @@ move_it_in_display_line_to (struct it *it, | |||
| 8812 | if (closest_pos < ZV) | 8812 | if (closest_pos < ZV) |
| 8813 | { | 8813 | { |
| 8814 | RESTORE_IT (it, &ppos_it, ppos_data); | 8814 | RESTORE_IT (it, &ppos_it, ppos_data); |
| 8815 | move_it_in_display_line_to (it, closest_pos, -1, | 8815 | /* Don't recurse if closest_pos is equal to |
| 8816 | MOVE_TO_POS); | 8816 | to_charpos, since we have just tried that. */ |
| 8817 | if (closest_pos != to_charpos) | ||
| 8818 | move_it_in_display_line_to (it, closest_pos, -1, | ||
| 8819 | MOVE_TO_POS); | ||
| 8817 | result = MOVE_POS_MATCH_OR_ZV; | 8820 | result = MOVE_POS_MATCH_OR_ZV; |
| 8818 | } | 8821 | } |
| 8819 | else | 8822 | else |
| @@ -8874,8 +8877,9 @@ move_it_in_display_line_to (struct it *it, | |||
| 8874 | && !at_eob_p && closest_pos < ZV) | 8877 | && !at_eob_p && closest_pos < ZV) |
| 8875 | { | 8878 | { |
| 8876 | RESTORE_IT (it, &ppos_it, ppos_data); | 8879 | RESTORE_IT (it, &ppos_it, ppos_data); |
| 8877 | move_it_in_display_line_to (it, closest_pos, -1, | 8880 | if (closest_pos != to_charpos) |
| 8878 | MOVE_TO_POS); | 8881 | move_it_in_display_line_to (it, closest_pos, -1, |
| 8882 | MOVE_TO_POS); | ||
| 8879 | } | 8883 | } |
| 8880 | result = MOVE_POS_MATCH_OR_ZV; | 8884 | result = MOVE_POS_MATCH_OR_ZV; |
| 8881 | break; | 8885 | break; |
| @@ -8893,7 +8897,9 @@ move_it_in_display_line_to (struct it *it, | |||
| 8893 | if (closest_pos < ZV) | 8897 | if (closest_pos < ZV) |
| 8894 | { | 8898 | { |
| 8895 | RESTORE_IT (it, &ppos_it, ppos_data); | 8899 | RESTORE_IT (it, &ppos_it, ppos_data); |
| 8896 | move_it_in_display_line_to (it, closest_pos, -1, MOVE_TO_POS); | 8900 | if (closest_pos != to_charpos) |
| 8901 | move_it_in_display_line_to (it, closest_pos, -1, | ||
| 8902 | MOVE_TO_POS); | ||
| 8897 | } | 8903 | } |
| 8898 | result = MOVE_POS_MATCH_OR_ZV; | 8904 | result = MOVE_POS_MATCH_OR_ZV; |
| 8899 | break; | 8905 | break; |