vim/vim-win32-installer

The console version of Vim says it's GUI-enabled.

RestorerZ opened this issue · 7 comments

Steps to reproduce

@k-takata , thanks for enabling support for VIMDLL functionality in the Vim editor.

It's not critical, but if you have a possibility, please see if you can somehow make the console version of Vim show that it's the console version and not the GUI version.

vimdll-out-cons-ver

vimdll-out-gui-ver

My understanding is that it's somewhere around here:

https://github.com/vim/vim/blob/f4572cee35a6c224985e71116e676ab711c09af3/src/version.c#L2306C1-L2324C7

Expected behaviour

Appropriate program type: with GUI and without GUI.

Version of Vim

VIM 9.1.626

Environment

WinNT 6.1

It is intentional and I'm not going to change this (as of now).

Now gvim.exe and vim.exe use the same core library (similar to Unix).
On Linux, if Vim is compiled with GUI, vim --version shows:

$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled May 03 2024 02:36:35)
Included patches: 1-213, 1840, 214-579, 1969, 580-1848, 4975, 5023, 2110, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, 2107-2109, 2109-2111, 2111-2112, 2112-2269, 3612, 3625, 3669, 3741, 1847
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version with GTK3 GUI.  Features included (+) or not (-):

The message is the same with gvim --version.

Interestingly, if you rename vim.exe to e.g. gvim-test.exe, it will open a GUI window. It is not useful at all, though.

well, that sad. On linux, I can run :gui and it will start the GUI version, if an X-Server is available, on Windows, this returns:

E25: GUI cannot be used: Not enabled at compile time

At the same time :echo has("gui") returns true, which in this case is a bit misleading...

It is intentional and I'm not going to change this (as of now).

Now gvim.exe and vim.exe use the same core library (similar to Unix). On Linux, if Vim is compiled with GUI, vim --version shows:

Well, I see. All right!

well, that sad. On linux, I can run :gui and it will start the GUI version, if an X-Server is available, on Windows, this returns:

E25: GUI cannot be used: Not enabled at compile time

At the same time :echo has("gui") returns true, which in this case is a bit misleading...

Yes, there is such a thing, although the documentation Make_mvc.mak says it is possible.
But vim.exe -g works.

At the same time :echo has("gui") returns true, which in this case is a bit misleading...

Ah, yes. It is a bit confusing.

There is an experimental implementation of :gui, but it is disabled now:
https://github.com/vim/vim/blob/f4572cee35a6c224985e71116e676ab711c09af3/src/gui.h#L226-L229

vim -g is handled specially.
vim.exe executes gvim.exe with the same command line and returns soon.

At the same time :echo has("gui") returns true, which in this case is a bit misleading...

Ah, yes. It is a bit confusing.

There is an experimental implementation of :gui, but it is disabled now: https://github.com/vim/vim/blob/f4572cee35a6c224985e71116e676ab711c09af3/src/gui.h#L226-L229

Oh! Thanks for the tip. I'll uncomment and test it.