Skip to content

Commit 064a5ab

Browse files
committed
fix: #113, when enable mod not render proper chunk
1 parent 3f0227b commit 064a5ab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lua/hlchunk/mods/chunk/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ local ChunkMod = class(BaseMod, constructor)
5454
function ChunkMod:enable()
5555
BaseMod.enable(self)
5656
self:extra()
57+
self:render(Scope(0, 0, -1))
5758
end
5859

5960
function ChunkMod:stopRender()

lua/hlchunk/mods/indent/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function IndentMod:calcRenderInfo(range)
8080
local blankLen = self.meta.cache:get(range.bufnr, lnum) --[[@as string]]
8181
local render_char_num, offset, shadow_char_num = indentHelper.calc(blankLen, leftcol, sw)
8282
for i = 1, render_char_num do
83-
local win_col = offset + (i - 1) * sw
83+
local win_col = offset + (i - 1) * sw
8484
local char = self.conf.chars[(i - 1 + shadow_char_num) % char_num + 1]
8585
local style = self.meta.hl_name_list[(i - 1 + shadow_char_num) % style_num + 1]
8686
table.insert(render_info, {

0 commit comments

Comments
 (0)