aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2015-03-03 14:35:41 -0800
committerPaul Eggert2015-03-03 14:35:41 -0800
commit2c82deee7fbb951a90ed3246350fbf9390af038a (patch)
tree465aaf0fdaefea778317ab1ed5c48400f223b596 /src
parent6eab3936c71951e304f13b69ad2e835ddaf9f2f4 (diff)
parentc0ba5908b117170995df36e839a087af7c5f79db (diff)
downloademacs-2c82deee7fbb951a90ed3246350fbf9390af038a.tar.gz
emacs-2c82deee7fbb951a90ed3246350fbf9390af038a.zip
Merge from origin/emacs-24
c0ba590 Fix vertical-motion and posn-at-point when word-wrap is a323b93 Better multi-line input support in comint.el 008a04a todo-mode.el: Restore point on setting item done (Bug#19727) 9615c0d doc/misc/erc.texi: fix typo c648717 Update ERC docs and update MAINTANERS to include myself d825f66 Fix filling circle/ellipse in Artist Mode (Bug#19763) Conflicts: admin/ChangeLog doc/misc/ChangeLog doc/misc/erc.texi lisp/ChangeLog src/ChangeLog
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/xdisp.c32
2 files changed, 38 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0a05b544d98..5bfb1809139 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,13 @@
12015-03-03 Eli Zaretskii <eliz@gnu.org> 12015-03-03 Eli Zaretskii <eliz@gnu.org>
2 2
3 * xdisp.c (move_it_in_display_line_to): Handle the case where the
4 last character of a screen line is whitespace, and we are under
5 word-wrap with overflow-newline-into-fringe turned on.
6 (Bug#19769)
7
82015-03-03 Eli Zaretskii <eliz@gnu.org>
92015-03-03 Eli Zaretskii <eliz@gnu.org>
10
3 * xdisp.c (handle_stop, handle_single_display_spec) 11 * xdisp.c (handle_stop, handle_single_display_spec)
4 (next-element_from_image): Don't reset the 12 (next-element_from_image): Don't reset the
5 ignore_overlay_strings_at_pos_p flag here. 13 ignore_overlay_strings_at_pos_p flag here.
diff --git a/src/xdisp.c b/src/xdisp.c
index 5ef839eb865..ce685fd6e22 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8604,7 +8604,16 @@ move_it_in_display_line_to (struct it *it,
8604 if (BUFFER_POS_REACHED_P ()) 8604 if (BUFFER_POS_REACHED_P ())
8605 { 8605 {
8606 if (it->line_wrap != WORD_WRAP 8606 if (it->line_wrap != WORD_WRAP
8607 || wrap_it.sp < 0) 8607 || wrap_it.sp < 0
8608 /* If we've just found whitespace to
8609 wrap, effectively ignore the
8610 previous wrap point -- it is no
8611 longer relevant, but we won't
8612 have an opportunity to update it,
8613 since we've reached the edge of
8614 this screen line. */
8615 || (may_wrap
8616 && IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)))
8608 { 8617 {
8609 it->hpos = hpos_before_this_char; 8618 it->hpos = hpos_before_this_char;
8610 it->current_x = x_before_this_char; 8619 it->current_x = x_before_this_char;
@@ -8668,7 +8677,26 @@ move_it_in_display_line_to (struct it *it,
8668 else 8677 else
8669 IT_RESET_X_ASCENT_DESCENT (it); 8678 IT_RESET_X_ASCENT_DESCENT (it);
8670 8679
8671 if (wrap_it.sp >= 0) 8680 /* If the screen line ends with whitespace, and we
8681 are under word-wrap, don't use wrap_it: it is no
8682 longer relevant, but we won't have an opportunity
8683 to update it, since we are done with this screen
8684 line. */
8685 if (may_wrap && IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
8686 {
8687 /* If we've found TO_X, go back there, as we now
8688 know the last word fits on this screen line. */
8689 if ((op & MOVE_TO_X) && new_x == it->last_visible_x
8690 && atx_it.sp >= 0)
8691 {
8692 RESTORE_IT (it, &atx_it, atx_data);
8693 atpos_it.sp = -1;
8694 atx_it.sp = -1;
8695 result = MOVE_X_REACHED;
8696 break;
8697 }
8698 }
8699 else if (wrap_it.sp >= 0)
8672 { 8700 {
8673 RESTORE_IT (it, &wrap_it, wrap_data); 8701 RESTORE_IT (it, &wrap_it, wrap_data);
8674 atpos_it.sp = -1; 8702 atpos_it.sp = -1;