GNU bug report logs - #54946
28.1; next-line skip one line when overlay is added in newline

Previous Next

Package: emacs;

Reported by: Yikai Zhao <yikai <at> z1k.dev>

Date: Fri, 15 Apr 2022 02:27:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.1

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

Bug is archived. No further changes may be made.

Full log


Message #8 received at 54946 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yikai Zhao <yikai <at> z1k.dev>
Cc: 54946 <at> debbugs.gnu.org
Subject: Re: bug#54946: 28.1;
 next-line skip one line when overlay is added in newline
Date: Fri, 15 Apr 2022 12:08:07 +0300
> From: Yikai Zhao <yikai <at> z1k.dev>
> Date: Fri, 15 Apr 2022 10:25:50 +0800
> 
> I encountered this issue when I'm editing some code using flycheck-mode
> and evil-mode: after flycheck-mode added an error region at the end of
> the line, press <down> on this line should forward two lines instead of
> one.
> 
> Here's the recipe to reproduce it using 'emacs -Q':
> 
> 
>     (with-current-buffer (get-buffer-create "test")
>       (setq truncate-lines t
>             line-move-visual nil)
>       (erase-buffer)
>       (insert (make-string 1000 ?x) "\nHELLO\nWORLD\n")
>       (let ((ov (make-overlay 1001 1002)))
>         (overlay-put ov 'before-string
>                      (propertize "!" 'display '(left-fringe right-arrow error))))
>       (beginning-of-buffer)
>       (switch-to-buffer (current-buffer)))
> 
> After executing the code, press <down>, the cursor would move to line 3;
> but I think the expected behavior is that the cursor would move to line 2.

Thanks.  This is a very old bug, and rears its ugly head only of
line-move-visual is disabled.

Should be fixed now on the emacs-28 branch.




This bug report was last modified 3 years and 89 days ago.

Previous Next


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