From 9a560f542311cb5ad5cc82cda8aa526f96f25996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 18 Dec 2020 18:03:57 +0800 Subject: some fixs --- script/provider/diagnostic.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'script/provider') diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua index b155a591..1d8b779d 100644 --- a/script/provider/diagnostic.lua +++ b/script/provider/diagnostic.lua @@ -64,6 +64,9 @@ end local function buildDiagnostic(uri, diag) local lines = files.getLines(uri) local text = files.getText(uri) + if not text or not lines then + return + end local relatedInformation if diag.related then -- cgit v1.2.3