diff --git a/lua/indentmini/init.lua b/lua/indentmini/init.lua index 685043c..1297b60 100644 --- a/lua/indentmini/init.lua +++ b/lua/indentmini/init.lua @@ -158,16 +158,9 @@ local function find_current_range(currow_indent) context.cur_inlevel = math.floor(currow_indent / context.step) end -local function clean_ctx(row) - if row == context.botrow then - context = { snapshot = {} } - end -end - local function on_line(_, _, bufnr, row) local sp = find_in_snapshot(row + 1) if sp.indent == 0 or out_current_range(row) then - clean_ctx(row) return end for i = 1, sp.indent - 1, context.step do @@ -196,7 +189,6 @@ local function on_line(_, _, bufnr, row) buf_set_extmark(bufnr, ns, row, col, opt.config) opt.config.virt_text_win_col = nil end - clean_ctx(row) end end