Skip to content

Commit

Permalink
fix: wrong row detect on clean fix #28
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Aug 30, 2024
1 parent 0ebb3e2 commit 9f40b26
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lua/indentmini/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 9f40b26

Please sign in to comment.