Skip to content

Commit cba4b26

Browse files
committed
Ensured that minimap has the appropriate cache lines.
1 parent 5be4d97 commit cba4b26

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/minimap.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ function MiniMap:draw()
471471
end
472472

473473
-- per line
474+
dv:ensure_cache(minimap_lines_start, endidx)
474475
for idx = minimap_lines_start, endidx do
475476
batch_syntax_type = nil
476477
batch_start = 0
@@ -479,11 +480,12 @@ function MiniMap:draw()
479480

480481
render_highlight(idx, line_y)
481482
local cache = highlighter_cache[dv][idx]
483+
--print("IDX", idx)
482484
if not highlighter_cache[dv][idx] then -- need to cache
483485
highlighter_cache[dv][idx] = {}
484486
cache = highlighter_cache[dv][idx]
485487
-- per token
486-
for _, text, style in dv:each_vline_token(idx, true) do
488+
for _, text, style in dv:each_vline_token(idx) do
487489
if not config.plugins.minimap.syntax_highlight then
488490
style = nil
489491
end

0 commit comments

Comments
 (0)