summaryrefslogtreecommitdiff
path: root/script-beta/files.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/files.lua')
-rw-r--r--script-beta/files.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/script-beta/files.lua b/script-beta/files.lua
index 06e598ee..2d2f00da 100644
--- a/script-beta/files.lua
+++ b/script-beta/files.lua
@@ -174,10 +174,12 @@ function m.removeAll()
m.globalVersion = m.globalVersion + 1
await.close('files.version')
for uri in pairs(m.fileMap) do
- m.fileMap[uri] = nil
- m.astMap[uri] = nil
- m.linesMap[uri] = nil
- m.onWatch('remove', uri)
+ if not m.libraryMap[uri] then
+ m.fileMap[uri] = nil
+ m.astMap[uri] = nil
+ m.linesMap[uri] = nil
+ m.onWatch('remove', uri)
+ end
end
--m.notifyCache = {}
end
@@ -187,7 +189,8 @@ function m.removeAllClosed()
m.globalVersion = m.globalVersion + 1
await.close('files.version')
for uri in pairs(m.fileMap) do
- if not m.openMap[uri] then
+ if not m.openMap[uri]
+ and not m.libraryMap[uri] then
m.fileMap[uri] = nil
m.astMap[uri] = nil
m.linesMap[uri] = nil