From 0897093f8dafdcf37967aa0a8db2c94d2532a279 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 1 Apr 2019 19:01:55 +0800 Subject: =?UTF-8?q?=E9=A2=84=E5=8A=A0=E8=BD=BD=E8=BF=87=E6=BB=A4100k?= =?UTF-8?q?=E4=BB=A5=E4=B8=8A=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/service.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server/src/service.lua') diff --git a/server/src/service.lua b/server/src/service.lua index af71e965..302b6335 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -218,6 +218,9 @@ function mt:readText(uri, path, buf, compiled) log.debug('No file: ', path) return end + if #text > 100000 then + return + end if self:getCachedFileCount() >= config.config.workspace.maxPreload then if not self._hasShowHitMaxPreload then self._hasShowHitMaxPreload = true -- cgit v1.2.3