Martin Krischik wrote:
Hello,
When gvim is started in gui mode but cannot connect to the X-Server it
falls back to terminal mode.
I would which that this feature could be disabled as it caused serious
problems when gvim is started as background task - in which case the now
simple vim has a terminal to display but no keyboard to accept commands
from.
Martin
PS: Please remember that on some operating systems gvim allways starts
as if --nofork has been set.
what happens if you place the following (untested) near the top of your
vimrc?
if has("gui_running")
au VimEnter *
\ if ! has("gui_running")
\ | echoerr "Error: Could not start the GUI"
\ | qall!
\ | endif
endif
The worse that can happen is if it has no effect; but I think this
should be able to detect that vim was started as gvim (gview, vim -g,
gvimdiff, etc.) but failed to start the GUI.
Best regards,
Tony.