all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#64988: 30.0.50; move-to-column can move across lines if there is a text with display property
@ 2023-08-01 10:53 Herman, Géza
  2023-08-01 12:25 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Herman, Géza @ 2023-08-01 10:53 UTC (permalink / raw)
  To: 64988

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






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-02 16:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 10:53 bug#64988: 30.0.50; move-to-column can move across lines if there is a text with display property Herman, Géza
2023-08-01 12:25 ` 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

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.