From: Darius Foo <darius.foo.tw@gmail.com>
To: 61580@debbugs.gnu.org
Subject: bug#61580: line-prefix and display text properties cause odd cursor movement
Date: Sat, 18 Feb 2023 00:39:00 +0800 [thread overview]
Message-ID: <CAKBp_ChuoAHWh7heecsrf9NLzOVCmcD-z6pTzXi+J4XKgKtfFw@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2023-02-17 16:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 16:39 Darius Foo [this message]
2023-02-18 11:42 ` bug#61580: line-prefix and display text properties cause odd cursor movement Eli Zaretskii
2023-03-02 10:31 ` Eli Zaretskii
2023-03-03 4:14 ` Darius Foo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKBp_ChuoAHWh7heecsrf9NLzOVCmcD-z6pTzXi+J4XKgKtfFw@mail.gmail.com \
--to=darius.foo.tw@gmail.com \
--cc=61580@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).