summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-08-27 14:06:15 +0300
committerEli Zaretskii <eliz@gnu.org>2022-08-27 14:06:15 +0300
commita2d62456a7b8da27fb9b64f71b6ce588f2d73287 (patch)
tree87ab516f5e2b04a4426d35ea9bedd20404aed739
parent6b1ed2f2c99a1c2da56c5f434570c438cad6576d (diff)
downloademacs-a2d62456a7b8da27fb9b64f71b6ce588f2d73287.tar.gz
Fix regression with cursor motion in Magit buffers
* lisp/simple.el (line-move): Condition movement optimizations on presence of very long lines. (Bug#57433)
-rw-r--r--lisp/simple.el16
1 files changed, 9 insertions, 7 deletions
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).