[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vertical-motion bug
From: |
Chong Yidong |
Subject: |
Re: vertical-motion bug |
Date: |
Sun, 16 Jul 2006 08:45:06 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> M-<
> M-: (insert (propertize "a" 'display "a\nb\nc\n")) RET
> M-<
> C-n (or M-: (vertical-motion 1))
>
> Result: point moves down three lines. The expected behavior, based on
> the `vertical-motion' docstring, is to move just one line.
>
> There is no way to move down just one line, since no buffer
> position corresponds to that screen position. Emacs can either
> move three lines or not move. So I think its actual behavior
> is the best possible thing it could do.
Sorry, I gave a bad test case. Try this:
M-: (let ((pos (point-min)))
(dotimes (i 10) (insert "a"))
(while (< pos (point-max))
(put-text-property pos (1+ pos) 'display (propertize "a\n"))
(setq pos (1+ pos))))
This puts a display property on each of the characters in the buffer,
so there is a valid buffer position. C-n and C-p skip past all of
them.