aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)