Skip to content

Commit

Permalink
autoreload docs only if their filename matches an actual file (#1698)
Browse files Browse the repository at this point in the history
  • Loading branch information
vqns authored Jan 21, 2024
1 parent fd9b17f commit c561eb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/plugins/autoreload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function dirwatch:check(change_callback, ...)
for _, doc in ipairs(core.docs) do
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 "")
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
reload_doc(doc)
else
Expand Down

0 comments on commit c561eb7

Please sign in to comment.