Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed May 3, 2024
1 parent a374469 commit 5f8fb68
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 @@ -11,7 +11,7 @@ local function col_in_screen(col)
end

---check text in current column is space
local function is_space(row, col)
local function non_or_space(row, col)
local text = api.nvim_buf_get_text(0, row, col, row, col + 1, {})[1]
return text and (#text == 0 or text == ' ') or false
end
Expand Down Expand Up @@ -77,7 +77,7 @@ local function on_line(_, _, bufnr, row)
local col = i - 1
local level = math.floor(col / shiftw) + 1
local hi_name = ('IndentLine%d%d'):format(row + 1, level)
if col_in_screen(col) and is_space(row, col) then
if col_in_screen(col) and non_or_space(row, col) then
opt.config.virt_text[1][2] = hi_name
if line_is_empty and col > 0 then
opt.config.virt_text_win_col = i - 1
Expand Down

0 comments on commit 5f8fb68

Please sign in to comment.