summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/require-path.lua3
-rw-r--r--script/workspace/workspace.lua1
2 files changed, 4 insertions, 0 deletions
diff --git a/script/workspace/require-path.lua b/script/workspace/require-path.lua
index f0a75eb1..56c94424 100644
--- a/script/workspace/require-path.lua
+++ b/script/workspace/require-path.lua
@@ -148,6 +148,9 @@ end
local function removeVisiblePath(uri)
local path = furi.decode(uri)
path = workspace.normalize(path)
+ if not path then
+ return
+ end
for _, scp in ipairs(workspace.folders) do
scp:get('visiblePath')[path] = nil
---@type collector
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index cb8bd68b..80df7d9c 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -234,6 +234,7 @@ end
---@async
function m.awaitLoadFile(uri)
+ m.awaitReady(uri)
local scp = scope.getScope(uri)
local ld <close> = loading.create(scp)
local native = m.getNativeMatcher(scp)