Don't check unnamed files in `autoreload` plugin

This commit is contained in:
Guldoman 2022-05-31 01:03:29 +02:00
parent 7dc069aa8f
commit 4f0d45d6ab
No known key found for this signature in database
GPG Key ID: EA928C8BDA1A8825
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ local on_check = dirwatch.check
function dirwatch:check(change_callback, ...) function dirwatch:check(change_callback, ...)
on_check(self, function(dir) on_check(self, function(dir)
for _, doc in ipairs(core.docs) do for _, doc in ipairs(core.docs) do
if 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 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