[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Weird interaction between `move-beginning-of-line', fields, and invisibl
From: |
Jorgen Schaefer |
Subject: |
Weird interaction between `move-beginning-of-line', fields, and invisible overlays |
Date: |
Sun, 18 Jun 2006 23:32:35 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Hello!
When using a prompt in a buffer with a field property,
`move-beginning-of-line' will move to the end of the prompt, not
the beginning of the line - unless the line before the field is
made invisible by an overlay.
To reproduce (tested in emacs -D -Q):
(with-current-buffer (get-buffer-create "*Test*")
(let ((inhibit-read-only t))
(erase-buffer))
(insert "At this prompt, `move-beginning-of-line' stays behind the prompt.\n"
"This is the expected behavior.\n"
(propertize "Bar> "
'field 'fnord
'read-only t
'rear-nonsticky t))
(insert "\n\nHere, it moves to the beginning the prompt.\n")
(let ((beg (point)))
(insert "Fnord!\n")
(let ((o (make-overlay beg (point))))
(overlay-put o 'invisible t)))
(insert (propertize "Bar> "
'field 'fnord
'read-only t
'rear-nonsticky t))
(switch-to-buffer "*Test*")
(goto-char (point-max)))
Regards,
-- Jorgen
--
((email . "address@hidden") (www . "http://www.forcix.cx/")
(gpg . "1024D/028AF63C") (irc . "nick forcer on IRCnet"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Weird interaction between `move-beginning-of-line', fields, and invisible overlays,
Jorgen Schaefer <=