Bug or feature? When running GUI-enabled Vim in a console (not possible
on W32, but on Unix it is), the has() and exists() functions do not
always reflect the _current_ reality. Examples:
:echo has("gui_gtk2")
1
In the above case it may be regarded as a feature: I can still check
has("gui_running") to know if the GUI is currently enabled, after all.
But:
:echo exists("+guicursor")
1
This makes my vimrc believe that we are in a console version where
'guicursor' is functional -- W32, maybe. Actually, setting 'guicursor'
will give no error but it won't work either: the cursor remains a block
in all modes, even if "hor15" or similar is used. Example:
if has("gui_running")
set guicursor=n-v-c:block-Cursor/lCursor,ve:ver35-Cursor,o:hor50-Cursor
set guicursor+=i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor
set guicursor+=sm:block-Cursor,a:blinkwait750-blinkoff750-blinkon750
else
if exists("+guicursor")
set guicursor=n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30
set guicursor+=sm:block,a:blinkwait750-blinkoff750-blinkon750
endif
endif
When running Gnome2-enabled Vim in Console mode with the above in the
vimrc, the normal-mode and insert-mode cursors are both a full-height
block in konsole; both are an underscore in /dev/tty. Shouldn't we, in
that case, get exists("&guicursor") == 1 but exists("+guicursor") == 0 ,
meaning the option is defined but not functional?
Best regards,
Tony.