autoreload docs only if their filename matches an actual file (#1698)

This commit is contained in:
vqn 2024-01-21 01:49:25 +01:00 committed by George Sokianos
parent dbeea0aff2
commit ad79e26425
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ function dirwatch:check(change_callback, ...)
for _, doc in ipairs(core.docs) do for _, doc in ipairs(core.docs) do
if doc.abs_filename and (dir == common.dirname(doc.abs_filename) or dir == doc.abs_filename) then if doc.abs_filename and (dir == common.dirname(doc.abs_filename) or dir == doc.abs_filename) then
local info = system.get_file_info(doc.filename or "") local info = system.get_file_info(doc.filename or "")
if info and times[doc] ~= info.modified then if info and info.type == "file" and times[doc] ~= info.modified then
if not doc:is_dirty() and not config.plugins.autoreload.always_show_nagview then if not doc:is_dirty() and not config.plugins.autoreload.always_show_nagview then
reload_doc(doc) reload_doc(doc)
else else