diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-26 17:32:48 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-26 17:32:48 +0800 |
commit | f637a34ca04a4f503e08ea977b44db9a26c641c3 (patch) | |
tree | d536bf7acf4ee06c5d71998b77b8596546fa1e17 /server | |
parent | 6ed62803fc201aacc4e9bd4aee6b24bcf2d7b217 (diff) | |
download | lua-language-server-f637a34ca04a4f503e08ea977b44db9a26c641c3.zip |
更新
Diffstat (limited to 'server')
-rw-r--r-- | server/src/method/textDocument/documentSymbol.lua | 5 | ||||
-rw-r--r-- | server/src/vm/source.lua | 2 | ||||
-rw-r--r-- | server/src/vm/value.lua | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/server/src/method/textDocument/documentSymbol.lua b/server/src/method/textDocument/documentSymbol.lua index 201137c8..915c0126 100644 --- a/server/src/method/textDocument/documentSymbol.lua +++ b/server/src/method/textDocument/documentSymbol.lua @@ -44,6 +44,11 @@ return function (lsp, params) timerCache[uri] = ac.loop(0.1, function (t) local vm, lines = lsp:getVM(uri) if not vm then + if not lsp:isWaitingCompile() then + t:remove() + timerCache[uri] = nil + response(nil) + end return end diff --git a/server/src/vm/source.lua b/server/src/vm/source.lua index af8b9ab3..b74d10d2 100644 --- a/server/src/vm/source.lua +++ b/server/src/vm/source.lua @@ -103,7 +103,7 @@ local function instant(source) Id = Id + 1 source.id = Id List[Id] = source - Watch[source] = Id + Watch[source] = Id setmetatable(source, mt) return true end diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index cfcdb66d..f0525b14 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -182,10 +182,6 @@ function mt:getChild(index, source) return value end -function mt:bindChild(other) - self._child = other._child -end - function mt:setMetaTable(metatable) self._meta = metatable end |