aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-12-10 19:54:19 +0200
committerEli Zaretskii2014-12-10 19:54:19 +0200
commit0c2f254bc3d69ba08a59037e8e192d5d7fb7d816 (patch)
tree8d025dcd9b1ab0a4d1258bb4c8bf651831092560 /src
parent935ee05f07019d0dc1ccf304317a6790767f5a20 (diff)
downloademacs-0c2f254bc3d69ba08a59037e8e192d5d7fb7d816.tar.gz
emacs-0c2f254bc3d69ba08a59037e8e192d5d7fb7d816.zip
Support overflow-newline-into-fringe together with word-wrap (bug#19300)
src/xdisp.c (move_it_in_display_line_to, display_line): Don't disallow overflow-newline-into-fringe when word-wrap is in effect.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c25
2 files changed, 23 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0a8acf935bd..b8663bcf7c0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-12-10 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (move_it_in_display_line_to, display_line): Don't
4 disallow overflow-newline-into-fringe when word-wrap is in
5 effect. (Bug#19300)
6
12014-12-04 Lee Duhem <lee.duhem@gmail.com> (tiny change) 72014-12-04 Lee Duhem <lee.duhem@gmail.com> (tiny change)
2 8
3 * eval.c (Fsignal): Remove duplicate test. 9 * eval.c (Fsignal): Remove duplicate test.
diff --git a/src/xdisp.c b/src/xdisp.c
index bd262818036..e3e00357ed0 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8792,12 +8792,7 @@ move_it_in_display_line_to (struct it *it,
8792 doesn't fit on the line, e.g. a wide image. */ 8792 doesn't fit on the line, e.g. a wide image. */
8793 it->hpos == 0 8793 it->hpos == 0
8794 || (new_x == it->last_visible_x 8794 || (new_x == it->last_visible_x
8795 && FRAME_WINDOW_P (it->f) 8795 && FRAME_WINDOW_P (it->f)))
8796 /* When word-wrap is ON and we have a valid
8797 wrap point, we don't allow the last glyph
8798 to "just barely fit" on the line. */
8799 && (it->line_wrap != WORD_WRAP
8800 || wrap_it.sp < 0)))
8801 { 8796 {
8802 ++it->hpos; 8797 ++it->hpos;
8803 it->current_x = new_x; 8798 it->current_x = new_x;
@@ -8864,7 +8859,8 @@ move_it_in_display_line_to (struct it *it,
8864 } 8859 }
8865 if (ITERATOR_AT_END_OF_LINE_P (it) 8860 if (ITERATOR_AT_END_OF_LINE_P (it)
8866 && (it->line_wrap != WORD_WRAP 8861 && (it->line_wrap != WORD_WRAP
8867 || wrap_it.sp < 0)) 8862 || wrap_it.sp < 0
8863 || IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)))
8868 { 8864 {
8869 result = MOVE_NEWLINE_OR_CR; 8865 result = MOVE_NEWLINE_OR_CR;
8870 break; 8866 break;
@@ -20389,7 +20385,8 @@ display_line (struct it *it)
20389 { 20385 {
20390 /* If line-wrap is on, check if a previous 20386 /* If line-wrap is on, check if a previous
20391 wrap point was found. */ 20387 wrap point was found. */
20392 if (wrap_row_used > 0 20388 if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)
20389 && wrap_row_used > 0
20393 /* Even if there is a previous wrap 20390 /* Even if there is a previous wrap
20394 point, continue the line here as 20391 point, continue the line here as
20395 usual, if (i) the previous character 20392 usual, if (i) the previous character
@@ -20419,6 +20416,18 @@ display_line (struct it *it)
20419 row->continued_p = 0; 20416 row->continued_p = 0;
20420 row->exact_window_width_line_p = 1; 20417 row->exact_window_width_line_p = 1;
20421 } 20418 }
20419 /* If line-wrap is on, check if a
20420 previous wrap point was found. */
20421 else if (wrap_row_used > 0
20422 /* Even if there is a previous wrap
20423 point, continue the line here as
20424 usual, if (i) the previous character
20425 was a space or tab AND (ii) the
20426 current character is not. */
20427 && (!may_wrap
20428 || IT_DISPLAYING_WHITESPACE (it)))
20429 goto back_to_wrap;
20430
20422 } 20431 }
20423 } 20432 }
20424 else if (it->bidi_p) 20433 else if (it->bidi_p)