Benjamin Fritz wrote:

> On Sat, Jul 24, 2010 at 7:17 AM, Bram Moolenaar <[email protected]> wrote:
> >
> > Sounds useful.  A few remarks.
> >
> > You copy the syn_get_id() function and make a tiny change.  Why not just
> > use syn_get_id() and call get_syntax_info() next?
> >
> 
> When I started writing the patch, get_syntax_info() didn't exist yet.
> I guess I didn't go far enough when I merged in the latest changes.
> This sounds like a good idea.
> 
> > The conceal character can be multi-byte.  You only use one byte.
> >
> 
> Rats, I was worried about that. I've never worked with multi-byte
> strings before. What is the best way to handle this? This being my
> first patch to the C code, I couldn't think of any functions to use as
> an example for returning a fixed-character-length multi-byte string.

Have a look at f_nr2char().

> > Don't you get a problem when there are consecutive matches with a
> > concealed item?  I was going to change that.
> 
> It works fine with multiple concealed items with different syntax IDs.
> With multiple concealed items with the same syntax id, it collapses
> into a single character, just like Vim does currently. Did you have
> any ideas of how you're going to fix this? I figured I should try to
> get the change in first, and adjust later when you fix it. Maybe
> synconcealed() could contain an extra flag that tells whether this is
> the start of a new region?

I'm planning to give every match and region a separate ID.  Just a
number that's incremented for every match.

-- 
There is no right or wrong, there is only your personal opinion.
                 (Bram Moolenaar)

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