On Sun, Dec 11, 2005 at 09:10:55AM +0100, Helge Kreutzmann wrote: > The following two sequences behave differently, although they should > not: > > a) echo "Hello" > /tmp/tfile > gvim /tmp/tfile > :close > > a) echo "Hello" > /tmp/tfile > gvim /tmp/tfile > File->Close > > In the first case, an error message is printed: > E444: Cannot close last window > and the file remains in the window. > > In the second case, the window is closed (but not gvim!) as expected, > without any error message.
The reason you're seeing the different behavior is because File->Close does more than just :close. It checks to see whether there is more than one window open or not. In your scenario (only one window), it actually performs ":confirm enew" since :close will always fail if there is only one window open (as noted in the help). James -- GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>
signature.asc
Description: Digital signature