Benjamin Fritz wrote:
> --00221534d4d3106d42048c2dddf2
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Sat, Jul 24, 2010 at 9:09 PM, Benjamin Fritz <[email protected]>
> wrote:
> >
> > Yup, I saw it, thanks. I'm playing with it now. Hopefully I'll figure
> > it out on my own, but it's acting weird. Maybe I'm doing something
> > wrong but here's what I see:
> >
> > If I call syn_get_id once prior to calling get_syntax_info, then after
> > the first match of a concealed item, the same sequence number is
> > returned for every other column in the line (looking at every column
> > sequentially). Additionally, the syntax flags are constantly showing
> > zero for the HL_CONCEAL bit, even when there is something concealable
> > at that column.
> >
> > If I call syn_get_id TWICE prior to calling get_syntax_info (just
> > calling it back-to-back works), then after the first syntax
> > highlighted item, every column after that gets a new sequence number,
> > regardless of whether a new syntax match is at that column. Also, the
> > HL_CONCEAL bit is being set as expected, but since the sequence number
> > constantly changes, this does little good.
> >
>
> I wrote the above after trying for a over an hour to figure out what
> was going on.
>
> Out of desperation, I made one simple change, changing the keep_state
> argument from TRUE to FALSE on the call to syn_get_id, and now it
> works as I expected. I haven't yet wrapped my head around why this
> works, but with a couple more tweaks, here is the updated patch.
>
> Based on changeset e6f1424dd66a: Let 'v' flag in 'concealcursor' apply
> to all lines in the Visual area.
>
> This should fix for multi-byte conceal characters (but I haven't tried
> that out yet), and also uses the new match sequence number in 2html
> for consecutive regions. TOhtml should work with conceal with this
> patch, except it doesn't duplicate the two oddities I noted
> previously.
Thanks. I did a few quick tests and it appears to work OK for me.
I'll make a few cosmetic changes
--
A parent can be arrested if his child cannot hold back a burp during a church
service.
[real standing law in Nebraska, United States of America]
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php