* bug#61580: line-prefix and display text properties cause odd cursor movement
@ 2023-02-17 16:39 Darius Foo
2023-02-18 11:42 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Darius Foo @ 2023-02-17 16:39 UTC (permalink / raw)
To: 61580
[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 1299 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#61580: line-prefix and display text properties cause odd cursor movement
2023-02-17 16:39 bug#61580: line-prefix and display text properties cause odd cursor movement Darius Foo
@ 2023-02-18 11:42 ` Eli Zaretskii
2023-03-02 10:31 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-02-18 11:42 UTC (permalink / raw)
To: Darius Foo; +Cc: 61580
> 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.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#61580: line-prefix and display text properties cause odd cursor movement
2023-02-18 11:42 ` Eli Zaretskii
@ 2023-03-02 10:31 ` Eli Zaretskii
2023-03-03 4:14 ` Darius Foo
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-03-02 10:31 UTC (permalink / raw)
To: darius.foo.tw; +Cc: 61580-done
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#61580: line-prefix and display text properties cause odd cursor movement
2023-03-02 10:31 ` Eli Zaretskii
@ 2023-03-03 4:14 ` Darius Foo
0 siblings, 0 replies; 4+ messages in thread
From: Darius Foo @ 2023-03-03 4:14 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 61580-done
[-- Attachment #1: Type: text/plain, Size: 114 bytes --]
> No further comments, so I'm now closing this bug as fixed.
Yes, it works now. Thanks for fixing it so quickly!
[-- Attachment #2: Type: text/html, Size: 207 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-03 4:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 16:39 bug#61580: line-prefix and display text properties cause odd cursor movement Darius Foo
2023-02-18 11:42 ` Eli Zaretskii
2023-03-02 10:31 ` Eli Zaretskii
2023-03-03 4:14 ` Darius Foo
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).