On Mo, 22 Sep 2014, Bram Moolenaar wrote:

> 
> Kartik Agaram wrote:
> 
> > > $ VIM= VIMRUNTIME= VIMINIT= *vim* -u /dev/null -c "set formatoptions=r | 
> > > *set comments=s1:/*,mb:*,ex:*/,n://"*
> > 
> > The problem goes away if I move the "n://" to the start of the string. (It
> > can't be in any other position in my example because start, middle and end
> > are required to be contiguous and in order.)
> > 
> > I realized this when I noticed that the loop that iterates over characters
> > in the line is using a value (part_buf) from an inner loop that iterates
> > over the leaders in 'comments':
> > https://code.google.com/p/vim/source/browse/src/misc1.c?r=54b031246e22#1796.
> > Which means it only performs the check for the final iteration of the inner
> > loop. Is this loop structure deliberate? That part_buf check in the outer
> > loop goes back all the way to vim 4.0 (earliest version with a 'comments'
> > option).
> > 
> > I've tracked the bug down to http://ftp.vim.org/vim/patches/7.3/7.3.180.
> > Still investigating a fix.
> 
> The problem also goes away when inserting something else before the
> "n:x".  Thus it's related to skipping over the three part comment.

So it is a bug?

Best,
Christian

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui