GNU bug report logs - #51550
29.0.50; Customize Group INS buttons sometimes don't have a left box line

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Mon, 1 Nov 2021 13:53:02 UTC

Severity: minor

Found in version 29.0.50

Fixed in version 31.1

Done: Mauro Aranda <maurooaranda <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Eli Zaretskii <eliz <at> gnu.org>, stephen.berman <at> gmx.net, 51550 <at> debbugs.gnu.org
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
Po Lu <luangruo <at> 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.




This bug report was last modified 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.