diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-17 20:40:48 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-17 20:40:48 +0800 |
commit | d24d1eb018787ccdff681e8d5baa33e13e036888 (patch) | |
tree | a406871d6ff29855204a709017aedcaf02ccc627 /script | |
parent | 77c15299948450fee84b42a5af55328dabf032e4 (diff) | |
download | lua-language-server-d24d1eb018787ccdff681e8d5baa33e13e036888.zip |
improve
Diffstat (limited to 'script')
-rw-r--r-- | script/files.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/script/files.lua b/script/files.lua index a653b364..517cd03d 100644 --- a/script/files.lua +++ b/script/files.lua @@ -186,12 +186,20 @@ function m.setText(uri, text, isTrust) if create then m.onWatch('create', originUri) end - m.onWatch('update', originUri) if DEVELOP then if text ~= newText then util.saveFile(LOGPATH .. '/diffed.lua', newText) end end + + await.call(function () + await.close('update:' .. originUri) + await.setID('update:' .. originUri) + await.delay() + if m.exists(originUri) then + m.onWatch('update', originUri) + end + end) end function m.setRawText(uri, text) |