aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorrxi <rxi@users.noreply.github.com>2020-05-10 08:16:34 +0100
committerrxi <rxi@users.noreply.github.com>2020-05-10 08:16:34 +0100
commit3c3a68b84bcbd9f087885454453b0c901c80a86c (patch)
treed08b2b47f3c5a9dcdd31b0f8252d8217356628c6 /plugins
parent157d8cc002a60739bfa3139ece2d5eff8d12a87b (diff)
downloadlite-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.lua6
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)