GNU bug report logs - #72420
set-goal-column misbehaves with a line-prefix and visual-line-mode

Previous Next

Package: emacs;

Reported by: "Martin Edström" <meedstrom <at> runbox.eu>

Date: Fri, 2 Aug 2024 13:23:01 UTC

Severity: normal

Tags: notabug

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: meedstrom <at> runbox.eu
Cc: 72420 <at> debbugs.gnu.org
Subject: bug#72420: set-goal-column misbehaves with a line-prefix and visual-line-mode
Date: Thu, 22 Aug 2024 17:33:16 +0300
> Cc: 72420 <at> debbugs.gnu.org
> Date: Tue, 20 Aug 2024 15:24:12 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: "Martin Edström" <meedstrom <at> runbox.eu>
> > Date: Tue, 20 Aug 2024 10:28:44 +0200 (CEST)
> > 
> > Can we undo the "notabug" tag on this one?  The bug is with visual-line-mode.
> 
> I didn't yet have time to take another look at this, sorry.  When I
> do, I will consider this aspect.

I've now made this test case behave the same both with and without
visual-line-mode on the master branch of the Emacs Git repository.
The patch is below (you will need to rebuild Emacs for it to be
effective, since simple.el is preloaded).

diff --git a/lisp/simple.el b/lisp/simple.el
index a9f8b58..1d3be2b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8200,7 +8200,7 @@ line-move-finish
 
 	;; Move to the desired column.
         (if (and line-move-visual
-                 (not (or truncate-lines truncate-partial-width-windows)))
+                 (not (or truncate-lines (truncated-partial-width-window-p))))
             ;; Under line-move-visual, goal-column should be
             ;; interpreted in units of the frame's canonical character
             ;; width, which is exactly what vertical-motion does.




This bug report was last modified 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.