@@ -45,7 +45,7 @@ function BlankMod:renderLine(bufnr, index, blankLen)
4545 priority = self .conf .priority ,
4646 }
4747 local leftcol = fn .winsaveview ().leftcol --[[ @as number]]
48- local sw = fn . shiftwidth () --[[ @as number ]]
48+ local sw = cFunc . get_sw ( bufnr )
4949 local render_char_num , offset , shadow_char_num = cFunc .calc (blankLen , leftcol , sw )
5050
5151 self :renderLeader (bufnr , index , offset , shadow_char_num , row_opts )
@@ -60,10 +60,7 @@ function BlankMod:renderLine(bufnr, index, blankLen)
6060 row_opts .virt_text_win_col = offset + (i - 1 ) * sw
6161
6262 -- when use treesitter, without this judge, when paste code will over render
63- if
64- row_opts .virt_text_win_col < 0
65- or row_opts .virt_text_win_col >= cFunc .get_indent (bufnr , index - 1 )
66- then
63+ if row_opts .virt_text_win_col < 0 or row_opts .virt_text_win_col >= cFunc .get_indent (bufnr , index - 1 ) then
6764 -- if the len of the line is 0, and have leftcol, we should draw it indent by context
6865 if api .nvim_buf_get_lines (bufnr , index - 1 , index , false )[1 ] ~= " " then
6966 return
0 commit comments