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: Lennart Borgman (gmail)
Subject: Re: Display problems with 'before-string in overlay
Date: Sun, 15 Apr 2007 03:10:21 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666

Kim F. Storm wrote:
"Lennart Borgman (gmail)" <address@hidden> writes:

Just another note if someone else is trying this. Having coming back
to this several times today I am starting to believe that the way to
fix this is to change cursor_row_p. This was the original way that Kim
tried to solve it. Maybe Kim's solution with an added test of if the
"string" has the 'display property will solve the problem for now.

I am unable to test this now, since I do not understand how to check
for the 'display property in cursor_row_p. If someone can tell that I
will test.

That is _not_ easy.
You have to record that during redisplay (by display_line in the glyph
row) if you need that information later.


I tested this way, but everything just gets very weird after some of the "Lisp_Object q_display" lines have been executed. I guess I am breaking something very fundamental. Could someone of you explain what?

static int
cursor_row_p (w, row)
     struct window *w;
     struct glyph_row *row;
{
  int cursor_row_p = 1;

  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)
        {
          int start = row->start.pos.charpos;
          int end = row->end.pos.charpos;
//Lisp_Object q_display = get_char_property_and_overlay (end, Qdisplay, Qnil, 0);
          Lisp_Object q_display = Fget_char_property (end, Qdisplay, Qnil);
//fprintf (stderr, "====> cursor_row_p.start=%d, end=%d, nil(q_display)=%d\n", start, end, NILP(q_display));
          cursor_row_p = row->continued_p;
        }





reply via email to

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