diff options
author | SwissalpS <Luke@SwissalpS.ws> | 2020-06-28 16:33:35 +0200 |
---|---|---|
committer | SwissalpS <Luke@SwissalpS.ws> | 2020-06-28 16:33:35 +0200 |
commit | 56bbc4a2910a1f9802f77a0f9248218af3d01eae (patch) | |
tree | 9b9b89b525c72adbe96324ed75847e154abef444 /plugins | |
parent | 6b3aa2a0a50f4bf90337476643064751c8976161 (diff) | |
download | lite-xl-plugins-56bbc4a2910a1f9802f77a0f9248218af3d01eae.tar.gz lite-xl-plugins-56bbc4a2910a1f9802f77a0f9248218af3d01eae.zip |
provide getter method for current scale
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/scale.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/scale.lua b/plugins/scale.lua index 95c4009..e0b5aa0 100644 --- a/plugins/scale.lua +++ b/plugins/scale.lua @@ -35,6 +35,10 @@ end local current_scale = SCALE local default = current_scale + +local function get_scale() return current_scale end + + local function set_scale(scale) scale = common.clamp(scale, 0.2, 6) @@ -86,4 +90,5 @@ keymap.add { ["ctrl+="] = "scale:increase", } -return { set_scale = set_scale } +return { get_scale = get_scale, set_scale = set_scale } + |