diff options
author | rxi <rxi@users.noreply.github.com> | 2020-05-10 08:16:34 +0100 |
---|---|---|
committer | rxi <rxi@users.noreply.github.com> | 2020-05-10 08:16:34 +0100 |
commit | 3c3a68b84bcbd9f087885454453b0c901c80a86c (patch) | |
tree | d08b2b47f3c5a9dcdd31b0f8252d8217356628c6 /plugins | |
parent | 157d8cc002a60739bfa3139ece2d5eff8d12a87b (diff) | |
download | lite-xl-plugins-3c3a68b84bcbd9f087885454453b0c901c80a86c.tar.gz lite-xl-plugins-3c3a68b84bcbd9f087885454453b0c901c80a86c.zip |
Updated drawwhitespace plugin not to use old `get_cached_line` func
Fixes #23
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/drawwhitespace.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/drawwhitespace.lua b/plugins/drawwhitespace.lua index b121833..016d18c 100644 --- a/plugins/drawwhitespace.lua +++ b/plugins/drawwhitespace.lua @@ -11,14 +11,14 @@ local draw_line_text = DocView.draw_line_text function DocView:draw_line_text(idx, x, y) draw_line_text(self, idx, x, y) - local cl = self:get_cached_line(idx) + local text = self.doc.lines[idx] local tx, ty = x, y + self:get_line_text_y_offset() local font = self:get_font() local color = style.whitespace or style.syntax.comment local map = config.whitespace_map - for i = 1, #cl.text do - local chr = cl.text:sub(i, i) + for i = 1, #text do + local chr = text:sub(i, i) local rep = map[chr] if rep then renderer.draw_text(font, rep, tx, ty, color) |