summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/src/service.lua3
1 files changed, 3 insertions, 0 deletions
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