]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix regression with cursor motion in Magit buffers
authorEli Zaretskii <eliz@gnu.org>
Sat, 27 Aug 2022 11:06:15 +0000 (14:06 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 27 Aug 2022 11:06:15 +0000 (14:06 +0300)
* lisp/simple.el (line-move): Condition movement optimizations on
presence of very long lines.  (Bug#57433)

lisp/simple.el

index ee765c8a575de1fce04c67701d1e25864f0affc2..d18d54ce16c345f700117ca2ccf0d1e5299b7c34 100644 (file)
@@ -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).