On Wednesday, January 9, 2013 12:05:13 PM UTC-6, Wiktor Ruben wrote:
> I use Vim 7.3.715. Let's create sample fold:
> 
> 
> 
> vim -u NONE -N
> 
> 
> 
> :set foldmethod=marker
> 
> i
> 
> {{{1<CR>
> 
> foo bar zaz<CR>
> 
> foo bar zaz<Esc>gg0za
> 
> 
> 
> Let's try search for 'foo': '/foo<CR>'. Fold will open and cursor will
> 
> be placed at the beginning of 'foo'. Great. Now, let's go back where
> 
> we started with 'gg0', close the fold with 'za' and set 'nowrapscan'
> 
> option. Do the search again. The fold won't open and the pattern won't
> 
> be found even though we are the very beginning of our file and there
> 
> is no need to wrap to find the pattern.

This seems to be related to the cursor being within the fold.

If I insert a blank line above your fold, a search properly finds the first 
"foo" if the cursor is placed on that blank line.

If the cursor is instead on the 2nd line which opens the fold, I get the same 
results. I.e. "foo" is not found.

Ending the folded region with a }}}1 does not change anything either.

I agree it looks like a bug.

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