Subject: Re: bug#57433: Emacs no longer moves point into visible port of the buffer

From: Eli Zaretskii <[email-masked]>
Date: Sat, 27 Aug 2022 13:19:20 +0300

> From: Gerd Möllmann <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sat, 27 Aug 2022 12:02:32 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Does Magit turn on truncate-lines in the affected buffer, or cause
> > them be truncated due to partial-width windows?  If it does, I might
> > have an idea what could cause the OP's problem.
> 
> Yes, truncate-lines it t.

In that case, can you see if the patch below solves the original issue
with Magit?

diff --git a/lisp/simple.el b/lisp/simple.el
index ee765c8..d18d54c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -7717,13 +7717,15 @@ line-move
 	       (not goal-column)
                ;; Lines aren't truncated.
                (not
-                (or truncate-lines
-                    (and (integerp truncate-partial-width-windows)
-                         (< (window-width)
-                            truncate-partial-width-windows))
-                    (and truncate-partial-width-windows
-                         (not (integerp truncate-partial-width-windows))
-                         (not (window-full-width-p)))))
+                (and
+                 (or truncate-lines
+                     (and (integerp truncate-partial-width-windows)
+                          (< (window-total-width)
+                             truncate-partial-width-windows))
+                     (and truncate-partial-width-windows
+                          (not (integerp truncate-partial-width-windows))
+                          (not (window-full-width-p))))
+                 (long-line-optimizations-p)))
 	       ;; When the text in the window is scrolled to the left,
 	       ;; display-based motion doesn't make sense (because each
 	       ;; logical line occupies exactly one screen line).