From e155e1462e613d347195f950696c4ad511358123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 29 Jan 2019 18:08:32 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=87=BD=E6=95=B0=E5=86=85=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=9A=84=E5=B1=80=E9=83=A8=E5=8F=98=E9=87=8F=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E4=BC=9A=E5=A4=B1=E6=95=88=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/completion.lua | 3 +++ server/src/core/vm.lua | 1 + 2 files changed, 4 insertions(+) (limited to 'server/src/core') diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua index 685aa8d3..4d735d9d 100644 --- a/server/src/core/completion.lua +++ b/server/src/core/completion.lua @@ -103,6 +103,9 @@ local function searchLocals(vm, pos, name, callback) if loc.source.start == 0 then goto CONTINUE end + if not loc.close then + log.debug('Miss loc close', table.dump(loc)) + end if loc.source.start <= pos and loc.close >= pos then if matchKey(name, loc.key) then callback(loc) diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua index a0c8df26..b88ae1ab 100644 --- a/server/src/core/vm.lua +++ b/server/src/core/vm.lua @@ -102,6 +102,7 @@ end function mt:createLocal(key, source, value) if source and source.bind then + self.scope.locals[key] = source.bind return source.bind end local loc = { -- cgit v1.2.3