emacs-diffs
[Top][All Lists]
Advanced

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

master 19b169c: Fix 'visual-line-mode' when 'word-wrap-by-category' is i


From: Eli Zaretskii
Subject: master 19b169c: Fix 'visual-line-mode' when 'word-wrap-by-category' is in effect
Date: Wed, 13 Jan 2021 09:46:57 -0500 (EST)

branch: master
commit 19b169c4e22abe5112d36ff4740f382409f6acdf
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix 'visual-line-mode' when 'word-wrap-by-category' is in effect
    
    * src/xdisp.c (move_it_in_display_line_to): Don't reset
    next_may_wrap after saving a potential wrap point.  This fixes the
    case where several characters in a row can serve as a wrap point.
    (Bug#45837)
---
 src/xdisp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 6a4304d..64f4016 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9285,8 +9285,8 @@ move_it_in_display_line_to (struct it *it,
              if (may_wrap && char_can_wrap_before (it))
                {
                  /* We have reached a glyph that follows one or more
-                    whitespace characters or a character that allows
-                    wrapping after it.  If this character allows
+                    whitespace characters or characters that allow
+                    wrapping after them.  If this character allows
                     wrapping before it, save this position as a
                     wrapping point.  */
                  if (atpos_it.sp >= 0)
@@ -9303,7 +9303,6 @@ move_it_in_display_line_to (struct it *it,
                    }
                  /* Otherwise, we can wrap here.  */
                  SAVE_IT (wrap_it, *it, wrap_data);
-                  next_may_wrap = false;
                }
               /* Update may_wrap for the next iteration.  */
               may_wrap = next_may_wrap;



reply via email to

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