From 20dc101229b969bb67b94c824b23f23818ee3104 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Tue, 3 May 2022 23:24:26 -0400 Subject: [PATCH] As per request from jgmdev, added in ability to show nagview always. --- data/plugins/autoreload.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/plugins/autoreload.lua b/data/plugins/autoreload.lua index 45d7217f..fba22a23 100644 --- a/data/plugins/autoreload.lua +++ b/data/plugins/autoreload.lua @@ -6,6 +6,10 @@ local Doc = require "core.doc" local common = require "core.common" local dirwatch = require "core.dirwatch" +config.plugins.autoreload = common.merge({ + always_show_nagview = false +}, config.plugins.autoreload) + local times = setmetatable({}, { __mode = "k" }) local function update_time(doc) @@ -35,7 +39,7 @@ end local function check_if_modified(doc) local info = system.get_file_info(doc.filename or "") if info and times[doc] ~= info.modified then - if not doc:is_dirty() then + if not doc:is_dirty() and not config.plugins.autoreload.always_show_nagview then reload_doc(doc) else doc.deferred_reload = true