Closed kjuq closed 7 months ago
I just ran into the same issue, and the fix works for me.
From the Lua docs: https://www.lua.org/pil/2.2.html
Lua considers both zero and the empty string as true in conditional tests
Yes, all values except nil and false are truthy in Lua. My bad, I forgot has
returns an int. Should've caught that before merging.
I should really setup CI and tests. I will make sure to do that before I merge the 1.0 patch.
I will merge this fix shortly, sorry for the delay.
Thanks for the PR! I appreciate it.
In Lua, integer value is always recognized as
true
. So we should check if a returned value fromvim.fn.has("win32")
is 1 or not.