diff options
author | Takase <20792268+takase1121@users.noreply.github.com> | 2021-11-18 23:41:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 23:41:59 +0800 |
commit | bc0a289a79294445de9b0001bdaada93d801dadd (patch) | |
tree | 118a0849555281a5f07ab08e2c21a132570210fa /plugins | |
parent | 25044338105d71939335ed0868202475fefb5e85 (diff) | |
parent | 41c0733aab56115be96705c0b5bef3893b65be68 (diff) | |
download | lite-xl-plugins-bc0a289a79294445de9b0001bdaada93d801dadd.tar.gz lite-xl-plugins-bc0a289a79294445de9b0001bdaada93d801dadd.zip |
Merge pull request #89 from lite-xl/revert-88-master
Revert "Fix: Indentguide plugin crashing lite-xl"
Diffstat (limited to 'plugins')
-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 |