Re: possible syntax bug: transparent region unaware of he= in containing region
- Brett Stahlman wrote:
> If you have a syntax region, which uses "he=" to highlight only aI suppose you can call it a bug. This patch should avoid the problem:
> portion of the region, and you have a contained transparent region,
> the transparent region causes the highlighting of the containing
> region to show through, even if the transparent region begins in a
> location where highlighting in the containing region has been turned
> off by the "he=".
> This is non-intuitive, since when you use transparent, you expect that
> there will be no visual indication that the transparent region exists.
> Here's a problem scenario:
> You highlight a region's first char only as Error. This region
> contains a transparent region, which appears much later within the
> region (not within Error highlighting). The transparent region also
> appears as Error...
> Is this a bug?
--- syntax.c 7 Oct 2004 20:56:39 -0000 1.5
+++ syntax.c 20 Nov 2004 14:34:54 -0000
@@ -2439,6 +2443,8 @@
sip->si_attr = CUR_STATE(idx - 1).si_attr;
sip->si_trans_id = CUR_STATE(idx - 1).si_trans_id;
+ sip->si_h_startpos = CUR_STATE(idx - 1).si_h_startpos;
+ sip->si_h_endpos = CUR_STATE(idx - 1).si_h_endpos;
if (sip->si_cont_list == NULL)
sip->si_flags |= HL_TRANS_CONT;
FATHER: We are here today to witness the union of two young people in the
joyful bond of the holy wedlock. Unfortunately, one of them, my son
Herbert, has just fallen to his death.
[Murmurs from CROWD; the BRIDE smiles with relief, coughs.]
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///