diff options
author | liquidev <liquidekgaming@gmail.com> | 2021-03-12 22:29:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 22:29:18 +0100 |
commit | bc02e34c2797c6436747a7eb975c449ddaec7cc8 (patch) | |
tree | 3f8523193faa220eeb8122713697f463c8304a76 /plugins | |
parent | 8215ca9c01bb3a1c38afe96407e0d3413913c162 (diff) | |
download | lite-xl-plugins-bc02e34c2797c6436747a7eb975c449ddaec7cc8.tar.gz lite-xl-plugins-bc02e34c2797c6436747a7eb975c449ddaec7cc8.zip |
updated lineguide to work with Lite XL
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/lineguide.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/lineguide.lua b/plugins/lineguide.lua index fc24567..7669c52 100644 --- a/plugins/lineguide.lua +++ b/plugins/lineguide.lua @@ -7,7 +7,9 @@ local draw = DocView.draw function DocView:draw(...) draw(self, ...) - local offset = self:get_font():get_width("n") * config.line_limit + local ns = ("n"):rep(config.line_limit) + local ss = self:get_font():subpixel_scale() + local offset = self:get_font():get_width_subpixel(ns) / ss local x = self:get_line_screen_position(1) + offset local y = self.position.y local w = math.ceil(SCALE * 1) |