From 4f0d45d6ab10cf86ff711fb2e2a66145e9021055 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Tue, 31 May 2022 01:03:29 +0200 Subject: [PATCH] Don't check unnamed files in `autoreload` plugin --- data/plugins/autoreload.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/plugins/autoreload.lua b/data/plugins/autoreload.lua index 8a45a2ca..6ef08a76 100644 --- a/data/plugins/autoreload.lua +++ b/data/plugins/autoreload.lua @@ -67,7 +67,7 @@ local on_check = dirwatch.check function dirwatch:check(change_callback, ...) on_check(self, function(dir) 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 "") if info and times[doc] ~= info.modified then if not doc:is_dirty() and not config.plugins.autoreload.always_show_nagview then