Closed rhysd closed 11 years ago
Ah, great catch. This is an issue with me not knowing enough about Vim variable scoping, I must confess. Also, there is another issue, which is that your final example (the code that should be generated) is not compilable in Riml. It throws an unexpected SCOPE_MODIFIER parse error.
Both of these fixes are pretty quick, and I'll mark this as going into the 0.3.6 release, which will happen this weekend.
Thanks for the report! Keep them coming :smile:
This is in version 0.3.6, which I just released. Thanks again for reporting.
I've confirmed that the bug is fixed. Thank you for quick fix!
When I compiled below riml code,
I got below Vim script code.
There is a problem in this Vim script code.
i
for items infor
statement is global scope. It pollutes global variables iffor
is used in global scope.However, local variable cannot be used in global scope. So, at least, script local variable should be used like below if
for
is used in global scope.