Dennis Nezic wrote:
On Tue, 16 May 2006 22:28:54 -0700 (PDT),
Gerald Lai <[EMAIL PROTECTED]> wrote:

On Wed, 17 May 2006, Dennis Nezic wrote:

when i exit my wm (e16), since it doesn't (and shouldn't) close any
other programs, gvim is stuck without an x server, and doesn't
handle this loss gracefully. effectively, it's as if it was kill
-9'ed ... and thus leaves temporary files behind, which i later
have to labouriously clean up.

can it not do something better .... like simply close down if no
changes were made to the file (and close any temp files). and, i
guess, leave the temp files behind if changes were made (as it
currently does in all cases :\).
You could try something like

        :au VimLeave * if v:dying | quitall! | endif

actually, vim does do what i expect it to do ... even without the
VimLeave autocmd ... gvim doesn't :\. i wonder if there is any event
that might work with gvim.


Gvim needs a keyboard device and a display device. IIUC, on Unix these are handled through X11. Now if X11 pops out, gvim suddenly finds itself with no keyboard or display. Morality: Don't close X11 as long as there are programs which use it, unless those same programs will be "properly" closed by the same action.

When you say vim behaves properly, do you mean vim running on /dev/tty (which doesn't use X11 at all) or vim running in an xterm or similar (where I/O goes through X11, but that is handled by the terminal emulator)?


Best regards,
Tony.

Reply via email to