From: Eli Zaretskii Date: Sat, 27 Aug 2022 11:06:15 +0000 (+0300) Subject: Fix regression with cursor motion in Magit buffers X-Git-Tag: emacs-29.0.90~1893^2~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a2d62456a7b8da27fb9b64f71b6ce588f2d73287;p=emacs.git Fix regression with cursor motion in Magit buffers * lisp/simple.el (line-move): Condition movement optimizations on presence of very long lines. (Bug#57433) --- diff --git a/lisp/simple.el b/lisp/simple.el index ee765c8a575..d18d54ce16c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7717,13 +7717,15 @@ not vscroll." (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).