File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ local function create_file(new_file_path)
97
97
if not is_error then
98
98
notify .info (new_file_path .. " was properly created" )
99
99
end
100
+ if M .enable_async then
101
+ async .schedule ()
102
+ end
103
+ -- synchronously refreshes as we can't wait for the watchers
104
+ find_file (utils .path_remove_trailing (new_file_path ))
100
105
end
101
106
102
107
local function get_containing_folder (node )
@@ -135,15 +140,12 @@ function M.fn(node, cb)
135
140
136
141
if M .enable_async then
137
142
async .exec (create_file , new_file_path , function (err )
138
- find_file (utils .path_remove_trailing (new_file_path ))
139
143
if cb then
140
144
cb (err )
141
145
end
142
146
end )
143
147
else
144
148
create_file (new_file_path )
145
- -- synchronously refreshes as we can't wait for the watchers
146
- find_file (utils .path_remove_trailing (new_file_path ))
147
149
end
148
150
end )
149
151
end
You can’t perform that action at this time.
0 commit comments