diff options
| author | Eli Zaretskii | 2014-03-07 22:00:33 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2014-03-07 22:00:33 +0200 |
| commit | b646ea12bdcdb31abece8ecce8bfd2e4ea1a682a (patch) | |
| tree | 916d028d6fabc10efeab56f03abd4cd3d57eabec | |
| parent | 1920914a0911bcce40758c97482a62ca8fa1b862 (diff) | |
| download | emacs-b646ea12bdcdb31abece8ecce8bfd2e4ea1a682a.tar.gz emacs-b646ea12bdcdb31abece8ecce8bfd2e4ea1a682a.zip | |
Fix bug #16961 with visual-order cursor movement and word-wrap.
src/xdisp.c (Fmove_point_visually): When under word-wrap, accept
also return value of MOVE_POS_MATCH_OR_ZV from
move_it_in_display_line_to, when moving from beginning of line to
point's position.
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/xdisp.c | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6d1285a82da..a63995129cd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-03-07 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (Fmove_point_visually): When under word-wrap, accept | ||
| 4 | also return value of MOVE_POS_MATCH_OR_ZV from | ||
| 5 | move_it_in_display_line_to, when moving from beginning of line to | ||
| 6 | point's position. (Bug#16961) | ||
| 7 | |||
| 1 | 2014-03-07 Martin Rudalics <rudalics@gmx.at> | 8 | 2014-03-07 Martin Rudalics <rudalics@gmx.at> |
| 2 | 9 | ||
| 3 | * buffer.c (Vbuffer_list_update_hook): Doc-string fix. | 10 | * buffer.c (Vbuffer_list_update_hook): Doc-string fix. |
diff --git a/src/xdisp.c b/src/xdisp.c index b8e08a30e1c..1513d4a9a87 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -20895,7 +20895,12 @@ Value is the new character position of point. */) | |||
| 20895 | new_pos = it.current.pos; | 20895 | new_pos = it.current.pos; |
| 20896 | 20896 | ||
| 20897 | while (it.current_x + it.pixel_width <= target_x | 20897 | while (it.current_x + it.pixel_width <= target_x |
| 20898 | && rc == MOVE_X_REACHED) | 20898 | && (rc == MOVE_X_REACHED |
| 20899 | /* Under word-wrap, move_it_in_display_line_to | ||
| 20900 | stops at correct coordinates, but sometimes | ||
| 20901 | returns MOVE_POS_MATCH_OR_ZV. */ | ||
| 20902 | || (it.line_wrap == WORD_WRAP | ||
| 20903 | && rc == MOVE_POS_MATCH_OR_ZV))) | ||
| 20899 | { | 20904 | { |
| 20900 | int new_x = it.current_x + it.pixel_width; | 20905 | int new_x = it.current_x + it.pixel_width; |
| 20901 | 20906 | ||