Bug#342845: vim-gtk: Inconsistent operation (menu vs. command line) for :close

James Vega jamessan at debian.org
Sat Oct 7 15:06:19 UTC 2006


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 <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20061007/772ac8d0/attachment.pgp


More information about the pkg-vim-maintainers mailing list