Matsushita Shougo wrote:

> Hi, I found the problem in indent/vim.vim.
> 
> >  elseif getline(lnum) =~ '^\s*aug\%[roup]' && getline(lnum) !~ 
> > '^\s*aug\%[roup]\s*!\=\s\+END'
> >    let ind = ind + &sw
> >  else
> >    let line = getline(lnum)
> >    let i = match(line, 
> > '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>')
> >    if i >= 0
> >      let ind += &sw
> >      if strpart(line, i, 1) == '|' && has('syntax_items')
> >            \ && synIDattr(synID(lnum, i, 1), "name") =~ 
> > '\(Comment\|String\)$'
> >        let ind -= &sw
> >      endif
> >    endif
> 
> The match uses "=~" and "!~" instead of "=~" and "!~".
> So if set ignorecase, the indentation is wrong.
> I fixed the problem. Would you check it?

Good idea.  I like the use of try/finally.

> Note: Same problem may be in other indentation plugins. But I don't check.

At least now we have a solution that can be applied to other plugins as
well.

-- 
panic("Foooooooood fight!");
        -- In the kernel source aha1542.c, after detecting a bad segment list

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.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