Skip to content

Commit

Permalink
fix wrong range of visible screen
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed May 9, 2024
1 parent 25f58a4 commit 3113585
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/indentmini/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ local function on_line(_, _, bufnr, row)
end
-- only render visible part of screen
srow = math.max(vim.fn.line('w0') - 2, srow)
erow = math.min(vim.fn.line('w$') - 1, erow)
erow = math.min(vim.fn.line('w$'), erow)
local level = math.floor(curindent / shiftw)
for i = srow + 2, erow, 1 do
api.nvim_set_hl(ns, ('IndentLine%d%d'):format(i, level), { link = cur_hi, force = true })
Expand Down

0 comments on commit 3113585

Please sign in to comment.