"Lennart Borgman (gmail)" <[EMAIL PROTECTED]> writes:

> I want to put an overlay at the top of a buffer and display several
> lines of text there. I use an overlay of length 1 at point 1 with a
> before-string property to do this... the cursor is displayed at the
> end of the first line of the 'before-string.
>
> [Modified test function]:
>
> (defun foo ()
>   (interactive)
>   (let ((o (make-overlay 1 1))
>         (s (propertize "A string\nwith several rows\nat top\n"
>                        'face 'highlight)))
>     (overlay-put o 'before-string s)))

This buglet appears to be due to the following change:

2005-07-13  Kim F. Storm  <[EMAIL PROTECTED]>

        * xdisp.c (cursor_row_p): Row is ok if cursor is at newline
        from string, but string starts on this line (so we always
        position cursor at start of string).

The relevant code is at xdisp.c:15861:

  if (PT == MATRIX_ROW_END_CHARPOS (row))
    {
      /* If the row ends with a newline from a string, we don't want
         the cursor there, but we still want it at the start of the
         string if the string starts in this row.
         If the row is continued it doesn't end in a newline.  */
      if (CHARPOS (row->end.string_pos) >= 0)
        cursor_row_p = (row->continued_p
                        || PT >= MATRIX_ROW_START_CHARPOS (row));

Changing this last line to `cursor_row_p = row->continued_p;', as it
was before, eliminates the bug.  I haven't thought about how to fix
this, though.


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to