-
Notifications
You must be signed in to change notification settings - Fork 33
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
vim patch 8.2.1506 breaks plugin: "using number as bool" #27
Comments
Do you happen to know why this change was made? Why would Vim not treat all
nonzero numbers as true in boolean context?
…On Tue, Sep 22, 2020, 5:10 PM Andy Weidenbaum ***@***.***> wrote:
Breaks sexp#leaf_flow on occasion. May break other things.
see: ***@***.***
<vim/vim@d70840e>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#27>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXOSQB2WDBNYBKSJUMZBL3SHEHEFANCNFSM4RWH7CPA>
.
|
Andy,
I haven't had a chance to download the latest Vim and test yet, but can you
tell me which part of the code you think is causing the issue? IIUC, the
Vim change you referenced is not supposed to affect legacy scripts at all...
Thanks,
Brett S.
…On Tue, Sep 22, 2020 at 5:10 PM Andy Weidenbaum ***@***.***> wrote:
Breaks sexp#leaf_flow on occasion. May break other things.
see: ***@***.***
<vim/vim@d70840e>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#27>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXOSQB2WDBNYBKSJUMZBL3SHEHEFANCNFSM4RWH7CPA>
.
|
…as bool Problem: Vim9: no error when using a number other than 0 or 1 as bool. Solution: Check the number is 0 or 1.
Dunno if Bram is correct there. Unless src/typval.c only applies to vim9script, the patch makes it an error to use numbers besides 0 and 1 as booleans. case VAR_NUMBER:
if (want_bool && varp->vval.v_number != 0
&& varp->vval.v_number != 1) |
Fixed in vim/vim@bade44e |
So IIUC, the Vim bug never made it into an official Vim release and would affect only those who built from git source or downloaded from a site that regularly generates binaries from master. I still might fix at some point. Actually, I may look at the list of Vim9 changes to see what it would take to make the whole plugin Vim9-safe to benefit from the increased speed... |
Breaks
sexp#leaf_flow
on occasion. May break other things.see: vim/vim@d70840e
The text was updated successfully, but these errors were encountered: