Benjamin Fritz wrote:

> On Sat, Jul 24, 2010 at 1:58 PM, Bram Moolenaar <[email protected]> wrote:
> >> >
> >> > I'm planning to give every match and region a separate ID.  Just a
> >> > number that's incremented for every match.
> >> >
> >>
> >> Ok, so it will just be a matter of using that ID instead of synID in
> >> 2html. I think this ID should be made accessible via script as well.
> >> synmatchID(), perhaps?
> >
> > It's implemented now.  I call it a sequence number.  It's obtained with
> > get_syntax_info(), like before.
> >
> 
> 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.

If you don't move forward one column at a time, the syntax needs to
resync and the sequence number changes.  Thus you must syn_get_id() with
a constantly increasing "col" argument for this to work.

>  I'll keep plugging away but if somebody knows right away what's going
> on (and maybe how to work around it) I'd love to hear it.
> 
> A couple of odd behaviors I'm seeing with conceal now, I'm not sure
> which changeset introduced them:
> 
> 1. Entire lines that get concealed as part of a multi-line region with
> the 'conceal' property do not show the cchar as they did previously.

I do see it.  Example?

> 2. concealends only shows the cchar for the end match, not the start match.

I can't reproduce this problem.  I tried your example and it appears to
work OK.  Are you using the latest snapshot?

-- 
Yesterday, all my deadlines seemed so far away
now it looks as though it's freeze in four days
oh I believe in cvs..
    [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ]

 /// 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

Raspunde prin e-mail lui