diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-03 15:30:55 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-03 15:30:55 +0800 |
commit | e5e7c27477b18857e8b07972a8f0b6589e2ffcb0 (patch) | |
tree | 5c6e19f325e40a167cf034a3acbbebef2e01ee23 | |
parent | f835c0a37b1d758bc20be33e036f7995ccfe8382 (diff) | |
download | lua-language-server-e5e7c27477b18857e8b07972a8f0b6589e2ffcb0.zip |
fix
-rw-r--r-- | script/vm/runner.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/script/vm/runner.lua b/script/vm/runner.lua index 4a26947a..97f362f3 100644 --- a/script/vm/runner.lua +++ b/script/vm/runner.lua @@ -270,9 +270,11 @@ function mt:_lookIntoAction(action, topNode) self:_lookIntoExp(value, topNode:copy()) end if action.type == 'setlocal' then - local newTopNode = self._callback(action, topNode) - if newTopNode then - topNode = newTopNode + if action.node == self._loc then + local newTopNode = self._callback(action, topNode) + if newTopNode then + topNode = newTopNode + end end elseif action.type == 'function' then self:_launchBlock(action, topNode:copy()) |