Skip to content

Commit

Permalink
fix wrong condition
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed May 6, 2024
1 parent b09ef87 commit e9a2093
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/indentmini/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ local function on_line(_, _, bufnr, row)
-- only render visible part of screen
local toprow = vim.fn.line('w0') - 2
local botrow = vim.fn.line('w$') - 1
srow = math.max(math.max(toprow, srow), 0)
erow = math.max(math.min(botrow, erow), api.nvim_buf_line_count(data.buf) - 1)
srow = math.max(toprow, srow)
erow = math.min(botrow, erow)
local level = math.floor(curindent / shiftw)
for i = srow + 1, erow, 1 do
api.nvim_set_hl(
Expand Down

0 comments on commit e9a2093

Please sign in to comment.