From: Eli Zaretskii Date: Thu, 3 Sep 2020 12:59:46 +0000 (+0300) Subject: Fix vertical cursor motion when 'visual-line-mode' is in effect X-Git-Tag: emacs-28.0.90~6270 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8cb15183aa8faba4af52d7b87e5ee4dcd3b1104f;p=emacs.git Fix vertical cursor motion when 'visual-line-mode' is in effect * 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. --- diff --git a/src/xdisp.c b/src/xdisp.c index dd737580438..406b2d70d58 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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. */