emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113259: Fix bug #2749 with overflow-newline-into-fr


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r113259: Fix bug #2749 with overflow-newline-into-fringe in visual-line-mode.
Date: Tue, 02 Jul 2013 15:53:13 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113259
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/2749
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Tue 2013-07-02 18:52:07 +0300
message:
  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.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-07-02 12:46:43 +0000
+++ b/src/ChangeLog     2013-07-02 15:52:07 +0000
@@ -1,3 +1,16 @@
+2013-07-02  Eli Zaretskii  <address@hidden>
+
+       * 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  <address@hidden>
 
        * process.c (handle_child_signal): Call catch_child_signal if

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-06-30 22:29:23 +0000
+++ b/src/xdisp.c       2013-07-02 15:52:07 +0000
@@ -378,8 +378,7 @@
    && ((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 @@
                                    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;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]