unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bug in `next-line' when last char in line has after-string property
@ 2007-01-02 17:54 Ben North
  2007-01-04 13:07 ` Kim F. Storm
  0 siblings, 1 reply; 6+ messages in thread
From: Ben North @ 2007-01-02 17:54 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

The attached file shows a bug in 22.0.92.  To reproduce, launch "emacs
-Q".  (The bug is exhibited with or without the "-nw" option.)
`find-file' the attached file.  Make sure your window is narrow enough
that the initial line of `-' characters wraps.  Go to the end of the
buffer (M->) and do `eval-last-sexp' (C-x C-e).  The desired behaviour
is that point ends up in the first column of the second line.  It in
fact ends up in the first column of the third line.

You can carry on playing with this: go to the very start of the buffer,
and hit C-n --- point moves down two lines instead of one.  I looked
into this a bit, which is what lead to the attached test-case using only
functions implemented in C, but I don't know the C code well enough to
dig further I'm afraid.  Hope the report is useful nonetheless.

[-- Attachment #2: line-motion-bug.el --]
[-- Type: application/octet-stream, Size: 509 bytes --]

; ------------------------------------------------------------------------------------------------------------------------------------

(progn (setq overlay
             (let ((end-of-first-line (save-excursion (goto-char 1) (end-of-line) (point))))
               (make-overlay (1- end-of-first-line) end-of-first-line))
             truncate-lines t)
       (overlay-put overlay 'after-string "X")
       (progn
         (goto-char 1)
         (goto-char (line-end-position))
         (vertical-motion 1)))

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

end of thread, other threads:[~2007-01-07 22:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-02 17:54 Bug in `next-line' when last char in line has after-string property Ben North
2007-01-04 13:07 ` Kim F. Storm
2007-01-05  0:31   ` Richard Stallman
2007-01-05 15:06     ` Kim F. Storm
2007-01-07 15:50       ` Ralf Angeli
2007-01-07 22:55         ` Kim F. Storm

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).