aboutsummaryrefslogtreecommitdiff
path: root/plugins/indentguide.lua
diff options
context:
space:
mode:
authorNightwing <94565465+JobinsJC@users.noreply.github.com>2021-11-18 22:19:09 +0900
committerGitHub <noreply@github.com>2021-11-18 21:19:09 +0800
commit25044338105d71939335ed0868202475fefb5e85 (patch)
treefcb9cfa67cb7a2829dce76164975c4cbe3f06022 /plugins/indentguide.lua
parentf7eddec42e0ef89d391c8513cb1d73676cf9ae13 (diff)
downloadlite-xl-plugins-25044338105d71939335ed0868202475fefb5e85.tar.gz
lite-xl-plugins-25044338105d71939335ed0868202475fefb5e85.zip
Update indentguide.lua (#88)
Diffstat (limited to 'plugins/indentguide.lua')
-rw-r--r--plugins/indentguide.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/indentguide.lua b/plugins/indentguide.lua
index 0513be4..2f8bb6a 100644
--- a/plugins/indentguide.lua
+++ b/plugins/indentguide.lua
@@ -39,10 +39,10 @@ function DocView:draw_line_text(idx, x, y)
local h = self:get_line_height()
local sspaces = ""
local font = self:get_font()
- local ss = font:subpixel_scale()
+
for _ = 0, spaces - 1, config.indent_size do
local color = style.guide or style.selection
- local sw = font:get_width_subpixel(sspaces) / ss
+ local sw = font:get_width(sspaces)
renderer.draw_rect(x + sw, y, w, h, color)
sspaces = sspaces .. (' '):rep(config.indent_size)
end