emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61580: closed (line-prefix and display text properties cause odd cur


From: GNU bug Tracking System
Subject: bug#61580: closed (line-prefix and display text properties cause odd cursor movement)
Date: Thu, 02 Mar 2023 10:32:02 +0000

Your message dated Thu, 02 Mar 2023 12:31:26 +0200
with message-id <83jzzze96p.fsf@gnu.org>
and subject line Re: bug#61580: line-prefix and display text properties cause 
odd cursor movement
has caused the debbugs.gnu.org bug report #61580,
regarding line-prefix and display text properties cause odd cursor movement
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61580: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61580
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: line-prefix and display text properties cause odd cursor movement Date: Sat, 18 Feb 2023 00:39:00 +0800
When moving the cursor up and down on lines which have both line-prefix and display text properties, the cursor column isn't preserved, jumping ahead or back by a fixed amount.

This can be reproduced with the following config

      (add-text-properties 12 13 '(line-prefix "  "))
      (add-text-properties 27 28 '(line-prefix "  "))
      (add-text-properties 57 58 '(line-prefix "    "))
      (add-text-properties 72 73 '(line-prefix "    "))

      (add-text-properties 12 13 '(display "•"))
      (add-text-properties 27 28 '(display "•"))
      (add-text-properties 57 58 '(display "•"))
      (add-text-properties 72 73 '(display "•"))

and this input file (which mimics org-indent).

    * h1
    ** h2
    - a.y.........
    - x...........
    *** h3
    **** h4
    - ....w.......
    - z...........

With the cursor on x, pressing up moves it to y instead of a, and pressing down moves it back to x. The amount moved depends on the indentation added by line-prefix: with the cursor on z, pressing up moves it to w.

--- End Message ---
--- Begin Message --- Subject: Re: bug#61580: line-prefix and display text properties cause odd cursor movement Date: Thu, 02 Mar 2023 12:31:26 +0200
> Cc: 61580@debbugs.gnu.org
> Date: Sat, 18 Feb 2023 13:42:31 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Darius Foo <darius.foo.tw@gmail.com>
> > Date: Sat, 18 Feb 2023 00:39:00 +0800
> > 
> > When moving the cursor up and down on lines which have both line-prefix and 
> > display text properties, the
> > cursor column isn't preserved, jumping ahead or back by a fixed amount.
> > 
> > This can be reproduced with the following config
> > 
> >       (add-text-properties 12 13 '(line-prefix "  "))
> >       (add-text-properties 27 28 '(line-prefix "  "))
> >       (add-text-properties 57 58 '(line-prefix "    "))
> >       (add-text-properties 72 73 '(line-prefix "    "))
> > 
> >       (add-text-properties 12 13 '(display "•"))
> >       (add-text-properties 27 28 '(display "•"))
> >       (add-text-properties 57 58 '(display "•"))
> >       (add-text-properties 72 73 '(display "•"))
> > 
> > and this input file (which mimics org-indent).
> > 
> >     * h1
> >     ** h2
> >     - a.y.........
> >     - x...........
> >     *** h3
> >     **** h4
> >     - ....w.......
> >     - z...........
> > 
> > With the cursor on x, pressing up moves it to y instead of a, and pressing 
> > down moves it back to x. The
> > amount moved depends on the indentation added by line-prefix: with the 
> > cursor on z, pressing up moves it to
> > w.
> 
> Thanks, should be fixed now on the emacs-29 branch.
> 
> (This bug was a leftover from incomplete fix of bug#49695.)

No further comments, so I'm now closing this bug as fixed.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]