[Top][All Lists]

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

Re: Question about display engine

From: martin rudalics
Subject: Re: Question about display engine
Date: Sun, 1 Sep 2019 10:14:06 +0200

>> To put this into praxis, the face merger would maintain a shadow copy
>> of the background value.  That shadow value would not get overwritten
>> when merging in the :background attribute of a face that does not have
>> the :extend attribute set.  Eventually, we would wind up with two,
>> possibly distinct values of the background to realize - one for the
>> normal and the shadow value for the extended background.
> The face merger doesn't maintain any state, so I don't think this is
> easily done.

The background would be stored in an extend_background slot of the
face vector (or maybe even a separate extend_vector) which would
contain the part of the state responsible for handling the background.

>> Note: We could also try to find out whether there _is_ another stop
>> position before the next EOL after merging faces and, if there's none,
>> realize the extended face eagerly, but I'm not sure whether this idea
>> can be incorporated easily.
> Right.

IIUC next_interval is newline agnostic.  The 'auto-composition-mode'
check does look for a newline within the next 1000 characters (around
line 3761 of xdisp.c) so we maybe could use that.

>> BTW: One problem with Ergus' proposal is that hacks like the one
>> proposed for Bug#15934 won't work any more.  For that bug, we could
>> obviously set the :extend attribute of the respective highlight line
>> face but all instances in the wild using the same hack already would
>> be affected by our change.
> Yes, of course.

So we should probably provide a :no-extend attribute, extend face
attributes by default and explicitly not extend some attributes like
underline and box.


reply via email to

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