aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-11-25 21:52:46 +0200
committerEli Zaretskii2011-11-25 21:52:46 +0200
commit91b4a718988e9d56c2e135d3d41ae3578cbacffd (patch)
tree471f9c3ddeaa037216fe3ce99e711bfb27931dae /src
parent4ad3bc2a221e84930ac53f09972a7b46362e4f21 (diff)
downloademacs-91b4a718988e9d56c2e135d3d41ae3578cbacffd.tar.gz
emacs-91b4a718988e9d56c2e135d3d41ae3578cbacffd.zip
Fix bug #10119 with C-e and whitespace-mode.
src/xdisp.c (start_display): Don't move to the next line if the display should start at a newline that is part of a display vector or an overlay string.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xdisp.c10
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fe7080f9c02..6d1a645c3ee 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -4,6 +4,9 @@
4 after recentering, and scroll-conservatively is set to a large 4 after recentering, and scroll-conservatively is set to a large
5 number, scroll window by a few more lines to make the cursor fully 5 number, scroll window by a few more lines to make the cursor fully
6 visible and out of scroll-margin. (Bug#10105) 6 visible and out of scroll-margin. (Bug#10105)
7 (start_display): Don't move to the next line if the display should
8 start at a newline that is part of a display vector or an overlay
9 string. (Bug#10119)
7 10
82011-11-24 Juri Linkov <juri@jurta.org> 112011-11-24 Juri Linkov <juri@jurta.org>
9 12
diff --git a/src/xdisp.c b/src/xdisp.c
index 9397d15acb7..921155940b5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2846,8 +2846,14 @@ start_display (struct it *it, struct window *w, struct text_pos pos)
2846 || (new_x == it->last_visible_x 2846 || (new_x == it->last_visible_x
2847 && FRAME_WINDOW_P (it->f)))) 2847 && FRAME_WINDOW_P (it->f))))
2848 { 2848 {
2849 if (it->current.dpvec_index >= 0 2849 if ((it->current.dpvec_index >= 0
2850 || it->current.overlay_string_index >= 0) 2850 || it->current.overlay_string_index >= 0)
2851 /* If we are on a newline from a display vector or
2852 overlay string, then we are already at the end of
2853 a screen line; no need to go to the next line in
2854 that case, as this line is not really continued.
2855 (If we do go to the next line, C-e will not DTRT.) */
2856 && it->c != '\n')
2851 { 2857 {
2852 set_iterator_to_next (it, 1); 2858 set_iterator_to_next (it, 1);
2853 move_it_in_display_line_to (it, -1, -1, 0); 2859 move_it_in_display_line_to (it, -1, -1, 0);