all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Herman@debbugs.gnu.org, Géza <geza.herman@gmail.com>
To: 64988@debbugs.gnu.org
Subject: bug#64988: 30.0.50; move-to-column can move across lines if there is a text with display property
Date: Tue, 1 Aug 2023 12:53:57 +0200	[thread overview]
Message-ID: <5fc075c6-c94b-eacf-6bbd-7d337caa2ee7@gmail.com> (raw)

If there is a text with display property in a buffer, then 
move-to-column can move across lines.

Repro:
* emacs -Q
* in the scratch buffer, move the cursor to the top, and put an empty 
line at the beginning of the buffer
* execute 'M-: (put-text-property 1 2 'display "line\n")' (note: it's 
likely that the "\n" causes the problem)
* notice that the empty line becomes "line"
* while the cursor still on the first line, execute 'M-: (move-to-column 
20)'

The last command will move the cursor to the next line at column 16, 
instead of staying at the first line.

Note: I noticed this problem while using this package: 
https://github.com/jdtsmith/indent-bars.

The problem doesn't happen with emacs 28, this is the commit that 
introduced the issue:

4243747b1b8c3b7e3463822804b32e83febe2878 Fix 'current-column' in the 
presence of display strings






             reply	other threads:[~2023-08-01 10:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 10:53 Herman, Géza [this message]
2023-08-01 12:25 ` bug#64988: 30.0.50; move-to-column can move across lines if there is a text with display property Eli Zaretskii
2023-08-01 12:57   ` Herman, Geza
2023-08-01 13:26     ` Eli Zaretskii
2023-08-01 14:32       ` Herman, Geza
2023-09-02 16:38   ` Stefan Kangas

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5fc075c6-c94b-eacf-6bbd-7d337caa2ee7@gmail.com \
    --to=herman@debbugs.gnu.org \
    --cc=64988@debbugs.gnu.org \
    --cc=geza.herman@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.