Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RestorerZ opened this issue Jul 29, 2024 · 7 comments
Open

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

RestorerZ opened this issue Jul 29, 2024 · 7 comments

Comments

@RestorerZ
Copy link
Contributor

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

@RestorerZ RestorerZ added the bug label Jul 29, 2024
@k-takata
Copy link
Member

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 [email protected]
Compiled by [email protected]
Huge version with GTK3 GUI.  Features included (+) or not (-):

The message is the same with gvim --version.

@k-takata
Copy link
Member

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.

@chrisbra
Copy link
Member

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...

@RestorerZ
Copy link
Contributor Author

RestorerZ commented Jul 29, 2024

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.

@k-takata
Copy link
Member

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

@k-takata
Copy link
Member

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

@RestorerZ
Copy link
Contributor Author

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.

@k-takata k-takata removed the bug label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants