Christian Brabandt wrote:

> ------=_20120828073641_97803
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On Mon, August 27, 2012 22:16, Dan wrote:
> > Steps:
> > Put the following in your vimrc
> > nnoremap z J
> > autocmd BufWinLeave *.* mkview
> > autocmd BufWinEnter *.* silent loadview
> >
> > In the commandline:
> > vim ~/foo
> >
> > Insert this text:
> > Test1
> > Test1
> >
> > Test2
> > Test2
> >
> > Fold the Test1 lines in one fold (enter visual mode, select them, then
> > press zf)
> >
> > Save and exit.
> >
> > Open the file with vim again and observe how the file has changed to:
> > Test1Test1
> >
> > Test2
> > Test2
> >
> > If you open the view for that file (in ~/.vim/views/ by default), you will
> > see there is a command:
> > normal zc
> >
> > mkview should use normal! not normal for folding commands, otherwise
> > mappings in the vimrc could be used (some folding operations seem to be
> > done with normal!, but some aren't).
> 
> Good catch.
> I found another point, where mkview uses normal instead of normal!
> and it is fixes with the attached patch.

Thanks for the quick fix.  I'll include it.

-- 
GALAHAD: No, please.  Please! I can defeat them!  There's only a hundred.
GIRLS:   He will beat us easily.  We haven't a chance.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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