James Vega wrote:

> On Sat, Aug 14, 2010 at 02:41:04PM +0200, Bram Moolenaar wrote:
> > 
> > I wrote:
> > 
> > > Gary Johnson wrote:
> > > 
> > > > In a directory containing a simple text file named 'mary', execute
> > > > the following:
> > > > 
> > > >     $ vim -u NONE -i NONE
> > > >     :r mary
> > > > 
> > > > The result is the following two error messages:
> > > > 
> > > >     E812: Autocommands changed buffer or buffer name
> > > >     E484: Can't open file mary
> > > > 
> > > > I don't know what autocommand that could be since I started Vim
> > > > without plugins and :scriptnames shows nothing.
> > > > 
> > > > This works without error if Vim is started in 'noncompatible' mode
> > > > or when using Vim 6.3.
> > > 
> > > I can reproduce it.  Strange that nobody noticed until now.
> > > 
> > > I'll fix it ASAP.
> > 
> > It was most likely introduced by patch 7.2.132, sent out March 5 2009.
> > 
> > This patch should fix it, please verify it doesn't introduce any new
> > problems:
> 
> That fixes the error message, but not the issue with the other buffer
> that I mentioned.
> 
>   $ printf "foo\n" > mary
>   $ vim -u NONE -i NONE existingfile
>   :r mary
>   :ls!
>     1 %a + "existingfile"                 line 2
>     2u#    "mary"                         line 1
> 
>   $ vim -u NONE -i NONE -N
>   :r mary
>   :ls!
>     1 %a + "[No Name]"                    line 2
>     2u#    "mary"                         line 1
> 
> This only happens in 'nocompatible' mode or if there is an existing
> buffer loaded.

I would think that works as intended.  An extra buffer entry is created
for the file, so that you can do ":e #".  Do you see a problem in that?

-- 
hundred-and-one symptoms of being an internet addict:
70. ISDN lines are added to your house on a hourly basis

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.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