From 5a8bb48667aacb0e478e97507642b439f86471c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 19 Oct 2019 17:42:19 +0800 Subject: =?UTF-8?q?=E4=B8=80=E4=BA=9B=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-beta/src/files.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server-beta/src') diff --git a/server-beta/src/files.lua b/server-beta/src/files.lua index a0346010..9a90aabb 100644 --- a/server-beta/src/files.lua +++ b/server-beta/src/files.lua @@ -36,7 +36,9 @@ function m.setText(uri, text) uri = uri:lower() end if not m.fileMap[uri] then - m.fileMap[uri] = {} + m.fileMap[uri] = { + uri = originUri, + } end local file = m.fileMap[uri] if file.text == text then @@ -88,6 +90,7 @@ function m.getAst(uri) if file.ast == nil then local state, err = parser:compile(file.text, 'lua', config.config.runtime.version) if state then + state.uri = file.uri file.ast = state else log.error(err) -- cgit v1.2.3