1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

Fix bug #2749 with overflow-newline-into-fringe in visual-line-mode.

src/xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
 word-wrap, so that overflow-newline-into-fringe would work in
 visual-line-mode.
 (move_it_in_display_line_to): When the last scanned display
 element fits exactly on the display line, and
 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
 wrap point and return MOVE_LINE_CONTINUED.  Fixes problems with
 finding buffer position that corresponds to pixel coordinates,
 e.g. in buffer_posn_from_coords.
This commit is contained in:
Eli Zaretskii 2013-07-02 18:52:07 +03:00
parent 2c41e78194
commit bcffb5caf8
2 changed files with 17 additions and 3 deletions

View File

@ -1,3 +1,16 @@
2013-07-02 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
word-wrap, so that overflow-newline-into-fringe would work in
visual-line-mode. (Bug#2749)
(move_it_in_display_line_to): When the last scanned display
element fits exactly on the display line, and
overflow-newline-into-fringe is non-nil, but wrap_it is valid,
don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
finding buffer position that corresponds to pixel coordinates,
e.g. in buffer_posn_from_coords.
2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
* process.c (handle_child_signal): Call catch_child_signal if

View File

@ -378,8 +378,7 @@ static Lisp_Object Qline_height;
&& ((IT)->bidi_it.paragraph_dir == R2L \
? (WINDOW_LEFT_FRINGE_WIDTH ((IT)->w) > 0) \
: (WINDOW_RIGHT_FRINGE_WIDTH ((IT)->w) > 0)) \
&& (IT)->current_x == (IT)->last_visible_x \
&& (IT)->line_wrap != WORD_WRAP)
&& (IT)->current_x == (IT)->last_visible_x)
#else /* !HAVE_WINDOW_SYSTEM */
#define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) 0
@ -8539,7 +8538,9 @@ move_it_in_display_line_to (struct it *it,
result = MOVE_LINE_CONTINUED;
break;
}
if (ITERATOR_AT_END_OF_LINE_P (it))
if (ITERATOR_AT_END_OF_LINE_P (it)
&& (it->line_wrap != WORD_WRAP
|| wrap_it.sp < 0))
{
result = MOVE_NEWLINE_OR_CR;
break;