Bram, have you had a moment to ponder about this issue?  Is one of the
approaches reasonable or is there anything else to be investigated?

On Thu, Jan 27, 2011 at 09:39, Gustavo Niemeyer <[email protected]> wrote:
> Hi Bram,
>
>> That doesn't look like the right solution, since it restarts from the
>> start of the line instead of using the column from the match.
>
> It feels like the right thing to do, since even though the line was
> already being processed, it's fully processed with a different goal.
>
>> You say that current_finished is set. I wonder where it gets set.
>> If it's not set correctly that should be fixed.  Otherwise perhaps this
>> flag needs to be reset.
>
> It gets set due to the call of syn_finish_line for synchronization
> in the same function right above:
>
>    had_sync_point = syn_finish_line(TRUE);
>
> Replacing syn_start_line() with these bits of it also fixes the bug:
>
>    current_finished = FALSE;
>    next_match_idx = -1;
>
> Is there a reason not to simply call syn_start_line() with the goal
> of restarting the syntax highlighting processing, though, and then
> changing the column to advance until the sync match ends?  It felt
> like a slightly cleaner solution to me, but both approaches work
> to fix the bug.
>
> --
> Gustavo Niemeyer
> http://niemeyer.net
> http://niemeyer.net/blog
> http://niemeyer.net/twitter
>



-- 
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/blog
http://niemeyer.net/twitter

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