fix: add another condition for decos set filter

Align line decoration that doesn't covered by filter range, even though it was touching it, should not be filtered out.
This commit is contained in:
kotaindah55 2025-02-04 00:14:25 +02:00
parent 8dca807b37
commit e371b7904d

View file

@ -79,8 +79,8 @@ export class DecorationBuilder {
filterTo = (this.parser.tokens[end]?.from ?? docLen);
return decoSet.map(update.changes).update({
add: ranges, filterFrom, filterTo,
filter(from, to) {
return (to == filterFrom || from == filterTo) && to != from;
filter(from, to, val) {
return (to == filterFrom || from == filterTo) && ((val.spec.type as Format) <= Format.ALIGN_JUSTIFY || to != from);
}
});
}