diff options
author | Takase <20792268+takase1121@users.noreply.github.com> | 2021-11-18 22:52:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 22:52:15 +0800 |
commit | 41c0733aab56115be96705c0b5bef3893b65be68 (patch) | |
tree | 118a0849555281a5f07ab08e2c21a132570210fa | |
parent | 25044338105d71939335ed0868202475fefb5e85 (diff) | |
download | lite-xl-plugins-41c0733aab56115be96705c0b5bef3893b65be68.tar.gz lite-xl-plugins-41c0733aab56115be96705c0b5bef3893b65be68.zip |
Revert "Update indentguide.lua (#88)"
This reverts commit 25044338105d71939335ed0868202475fefb5e85.
-rw-r--r-- | plugins/indentguide.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/indentguide.lua b/plugins/indentguide.lua index 2f8bb6a..0513be4 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(sspaces) + local sw = font:get_width_subpixel(sspaces) / ss renderer.draw_rect(x + sw, y, w, h, color) sspaces = sspaces .. (' '):rep(config.indent_size) end |