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

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

bug#51550: 29.0.50; Customize Group INS buttons sometimes don't have a l


From: Po Lu
Subject: bug#51550: 29.0.50; Customize Group INS buttons sometimes don't have a left box line
Date: Mon, 27 Dec 2021 19:19:47 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Po Lu <luangruo@yahoo.com> writes:

> I think the solution is to save the face ID of the iterator after the
> call to extend_face_to_end_of_line, then compare it to the face after
> the iterator is reseated to the next line, and set
> it->start_of_box_run_p to true if that face is different and also has a
> box.

I have this code mostly working now, but I don't understand why
set_iterator_to_next doesn't seem to be updating it->face_id.

AFAIU, set_iterator_to_next called with RESEAT set to true eventually
calls reseat, which in turn calls handle_face_prop through handle_stop
if the iterator was reseated past the stop position, which should be set
to the beginning of the next line when the face property at that next
line differs from the line whose face is being extended.

However, handle_face_prop is never called, so I have to call it manually
like this:

          /* Consume the line end.  This skips over invisible lines.  */
          set_iterator_to_next (it, true);

-->       handle_face_prop (it);
          if (it->face_id != DEFAULT_FACE_ID
              && it->face_id != saved_face_id)
            {
              face = FACE_FROM_ID_OR_NULL (it->f, it->face_id);
              if (face && face->box != FACE_NO_BOX)
                {
                  it->face_box_p = true;
                  it->start_of_box_run_p = true;
                }
            }

Any ideas?  Thanks.




reply via email to

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