aboutsummaryrefslogtreecommitdiff
path: root/plugins/scalestatus.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/scalestatus.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/scalestatus.lua')
-rw-r--r--plugins/scalestatus.lua14
1 files changed, 3 insertions, 11 deletions
diff --git a/plugins/scalestatus.lua b/plugins/scalestatus.lua
index 2981523..8f3ef68 100644
--- a/plugins/scalestatus.lua
+++ b/plugins/scalestatus.lua
@@ -1,24 +1,16 @@
--- mod-version:1 -- lite-xl 1.16
+-- mod-version:2 -- lite-xl 2.0
--[[
scalestatus.lua
displays current scale (zoom) in status view
version: 20200628_155804
originally by SwissalpS
-
- Depends on plugin scale.lua version >= 20200628_154010
--]]
local scale = require "plugins.scale"
--- make sure plugin is installed and has get_scale field
-if not scale.get_scale then
- local core = require "core"
- core.error("Plugin 'scale' needs to be updated, scalestatus inactive.")
- return false
-end
local config = require "core.config"
local StatusView = require "core.statusview"
-config.scalestatus_format = '%.0f%%'
+config.plugins.scalestatus = { format = '%.0f%%' }
local get_items = StatusView.get_items
function StatusView:get_items()
@@ -27,7 +19,7 @@ function StatusView:get_items()
local t = {
self.separator,
- string.format(config.scalestatus_format, scale.get_scale() * 100),
+ string.format(config.plugins.scalestatus.format, scale.get() * 100),
}
for _, item in ipairs(t) do