[vim/vim] Accept a script local variable in a function which overrides a previous block-scope variable (PR #19963)

3 views
Skip to first unread message

Yegappan Lakshmanan

unread,
3:50 PM (5 hours ago) 3:50 PM
to vim/vim, Subscribed

When a function is defined at the top level of a script, it should be able to see
script-local variables defined at that same level.

The find_script_var() function was missing a check for the case where uf_block_depth
is zero. Added a check to ensure sav_block_id == 0 is accepted as visible when the
function is not inside a nested block.

Fixes the issue reported in #19959.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19963

Commit Summary

  • af024d8 Accept a script local variable in a function which overrides a previous block-scope variable

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19963@github.com>

Reply all
Reply to author
Forward
0 new messages