-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Open
Labels
Description
Problem
The vim.fn.has
docs state the following:
2. Runtime condition or other pseudo-feature.
For example "win32" feature checks if the current system is Windows:
if has("win32")
...
endif
However running:
:lua if(vim.fn.has("win32")) then print("hello!") end
prints 'hello!' even when on linux
Instead if you run:
:lua if(vim.fn.has("win32") == 1) then print("hello!") end
nothing is printed
Steps to reproduce
:lua if(vim.fn.has("win32")) then print("hello!") end
when on not-Windows
Expected behavior
Docs should be updated
Nvim version (nvim -v)
0.11.0
Vim (not Nvim) behaves the same?
no
Operating system/version
Ubuntu 24.04 LTS
Terminal name/version
Wezterm
$TERM environment variable
xterm-256color
Installation
apt