aboutsummaryrefslogtreecommitdiff
path: root/plugins/autowrap.lua
diff options
context:
space:
mode:
authorFrancesco <francesco.bbt@gmail.com>2021-08-17 22:44:17 +0200
committerGitHub <noreply@github.com>2021-08-17 22:44:17 +0200
commit49d3d21c987645b448184a752043946ed90d6031 (patch)
treeb187286f2ed78fa9317f288dc0c5144840bcdad9 /plugins/autowrap.lua
parenta42a0d57b08a9080ed9fd8fa84f1269e3847980f (diff)
parent9689846686f77dc0aa1e6f4d31fbfc42998c2085 (diff)
downloadlite-xl-plugins-49d3d21c987645b448184a752043946ed90d6031.tar.gz
lite-xl-plugins-49d3d21c987645b448184a752043946ed90d6031.zip
Merge pull request #45 from lite-xl/2.0
2.0 Merge
Diffstat (limited to 'plugins/autowrap.lua')
-rw-r--r--plugins/autowrap.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/autowrap.lua b/plugins/autowrap.lua
index 1d5d08d..38f8eb3 100644
--- a/plugins/autowrap.lua
+++ b/plugins/autowrap.lua
@@ -1,10 +1,10 @@
--- mod-version:1 -- lite-xl 1.16
+-- mod-version:2 -- lite-xl 2.0
require "plugins.reflow"
local config = require "core.config"
local command = require "core.command"
local DocView = require "core.docview"
-config.autowrap_files = { "%.md$", "%.txt$" }
+config.plugins.autowrap = { files = { "%.md$", "%.txt$" } }
local on_text_input = DocView.on_text_input
@@ -15,7 +15,7 @@ DocView.on_text_input = function(self, ...)
-- early-exit if the filename does not match a file type pattern
local filename = self.doc.filename or ""
local matched = false
- for _, ptn in ipairs(config.autowrap_files) do
+ for _, ptn in ipairs(config.plugins.autowrap.files) do
if filename:match(ptn) then
matched = true
break