]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix vertical cursor motion when 'visual-line-mode' is in effect
authorEli Zaretskii <eliz@gnu.org>
Thu, 3 Sep 2020 12:59:46 +0000 (15:59 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 3 Sep 2020 12:59:46 +0000 (15:59 +0300)
* src/xdisp.c (move_it_in_display_line_to): Fix a logic error made
as part of introducing the 'word-wrap-by-category' feature; that
error brought back bug#8155.

src/xdisp.c

index dd7375804383017213c29b7b6d30c9ab57f037ba..406b2d70d588d2363cd85e598a4ca4b2d2d9fc02 100644 (file)
@@ -9532,7 +9532,7 @@ move_it_in_display_line_to (struct it *it,
                         we can't wrap here.  Therefore, wrap_it
                         (previously found wrap-point) _is_ relevant
                         in that case.  */
-                     && !(moved_forward && char_can_wrap_before (it)))
+                     && (!moved_forward || char_can_wrap_before (it)))
                    {
                      /* If we've found TO_X, go back there, as we now
                         know the last word fits on this screen line.  */