From fed7e101b8815763702b091b925d35908fd1162a 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, 25 Dec 2018 12:25:01 +0800 Subject: =?UTF-8?q?=E5=BA=94=E8=AF=A5=E8=A6=81=E5=80=92=E5=BA=8F=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/service.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/src/service.lua b/server/src/service.lua index dbe24778..21bb6015 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -172,7 +172,7 @@ function mt:needCompile(uri) return end self._needCompile[uri] = true - self._needCompile[#self._needCompile+1] = uri + table.insert(self._needCompile, 1, uri) end function mt:saveText(uri, version, text) @@ -303,6 +303,9 @@ function mt:compileChain(child, parent) if not parentObj or not childObj then return end + if parentObj == childObj then + return + end if not parentObj.child then parentObj.child = {} -- cgit v1.2.3