emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display problems with 'before-string in overlay


From: Chong Yidong
Subject: Re: Display problems with 'before-string in overlay
Date: Thu, 12 Apr 2007 15:34:31 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (gnu/linux)

"Lennart Borgman (gmail)" <address@hidden> writes:

>       /* 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
>                         ||
>                         (
>                          /* If an overlay string starts on this glyph
>                             line, then put the cursor here, but only
>                             if not on the first buffer line and there
>                             are no characters there.  */
>                          ((CHARPOS (row->start.string_pos)) == -1)
>                          &&
>                          ((CHARPOS (row->end.string_pos)) > -1)
>                          &&
>                          (row->start.pos.charpos > 1)
>                          ));

This does not solve the underlying problem, because the unexpected
cursor position can occur even if the affected overlay is not on the
first line.

> as can be seen from the fprintf output with my test case it starts
> looping when I go to the first character and then press left arrow.

As you can see, tweaking redisplay can have rather non-trivial
effects.

> Could you please tell me how then? I want to display text at the top
> of a buffer, but I do not want to change the users text in the buffer.

Why not just use a header line?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]