On Sat, Jul 24, 2010 at 10:02 AM, Bram Moolenaar <[email protected]> wrote:
>
> Benjamin Fritz wrote:
>
>> On Sat, Jul 24, 2010 at 7:17 AM, Bram Moolenaar <[email protected]> wrote:
>>
>> > 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().
>

Thanks, will do.

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

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?

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