aboutsummaryrefslogtreecommitdiff
path: root/plugins/autowrap.lua
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-05-24 20:13:57 -0400
committerjgmdev <jgmdev@gmail.com>2022-05-24 20:13:57 -0400
commit5faa8d330663d7a3b5b5ada2dc036cf8b7a1749d (patch)
treef74994ea6c97e25717de51ba6de059802dd044dc /plugins/autowrap.lua
parentef4088437c664637fcd4a73d342beeacdebec180 (diff)
downloadlite-xl-plugins-5faa8d330663d7a3b5b5ada2dc036cf8b7a1749d.tar.gz
lite-xl-plugins-5faa8d330663d7a3b5b5ada2dc036cf8b7a1749d.zip
renamed enable to enabled to match all plugins
Diffstat (limited to 'plugins/autowrap.lua')
-rw-r--r--plugins/autowrap.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/autowrap.lua b/plugins/autowrap.lua
index 238053d..577a1b9 100644
--- a/plugins/autowrap.lua
+++ b/plugins/autowrap.lua
@@ -6,7 +6,7 @@ local common = require "core.common"
local DocView = require "core.docview"
config.plugins.autowrap = common.merge({
- enable = false,
+ enabled = false,
files = { "%.md$", "%.txt$" },
-- The config specification used by the settings gui
config_spec = {
@@ -14,7 +14,7 @@ config.plugins.autowrap = common.merge({
{
label = "Enable",
description = "Activates text auto wrapping by default.",
- path = "enable",
+ path = "enabled",
type = "toggle",
default = false
},
@@ -34,7 +34,7 @@ local on_text_input = DocView.on_text_input
DocView.on_text_input = function(self, ...)
on_text_input(self, ...)
- if not config.plugins.autowrap.enable then return end
+ if not config.plugins.autowrap.enabled then return end
-- early-exit if the filename does not match a file type pattern
local filename = self.doc.filename or ""
@@ -61,8 +61,8 @@ end
command.add(nil, {
["auto-wrap:toggle"] = function()
- config.plugins.autowrap.enable = not config.plugins.autowrap.enable
- if config.plugins.autowrap.enable then
+ config.plugins.autowrap.enabled = not config.plugins.autowrap.enabled
+ if config.plugins.autowrap.enabled then
core.log("Auto wrap: on")
else
core.log("Auto wrap: off")