all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21207: 25.0.50; Cursor position behaves unpredictably on the 'display text property
@ 2015-08-07 15:07 Artur Malabarba
  2015-08-07 15:29 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Artur Malabarba @ 2015-08-07 15:07 UTC (permalink / raw)
  To: 21207

1. Type `single line' into an empty buffer, and place the cursor at the space.
2. Hit M-: and evaluate the following snippet
    (add-text-properties (point) (1+ (point)) '(display "\n"))
3. When the space in the middle gets "turned" into a newline, the
cursor is left where it was (at the fake end of the first line, right
after the word `single').
4. Now follow the same steps on a new buffer, but evalate this instead:
(add-text-properties (point) (1+ (point)) '(display "\n------"))
5. This time, the cursor will be moved down to the start of the second
"fake" line (right before the `-----'). Furthermore, it is impossible
to place it at the position we had in item 3, it just jumps straight
from the first `e' to the first `-', skipping the actual newline char.

If I can place the cursor on the newline in the first scenario, why
can't I do so in the second?
Is there a way around this?
I tried adding a '(cursor t) property to the "\n" substring, but
nothing changed.


Cheers,
Artur





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

end of thread, other threads:[~2015-08-08 18:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-07 15:07 bug#21207: 25.0.50; Cursor position behaves unpredictably on the 'display text property Artur Malabarba
2015-08-07 15:29 ` Eli Zaretskii
2015-08-07 18:23   ` Eli Zaretskii
2015-08-07 19:43     ` Artur Malabarba
2015-08-08  7:27       ` Eli Zaretskii
2015-08-08 18:08         ` Artur Malabarba
2015-08-07 18:31   ` Artur Malabarba
2015-08-07 19:04     ` Eli Zaretskii
2015-08-07 19:56       ` Artur Malabarba
2015-08-07 20:13         ` Eli Zaretskii
2015-08-08  3:39           ` Artur Malabarba
2015-08-08  6:52             ` Eli Zaretskii

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.