Skip to content

Commit

Permalink
fix: remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Aug 28, 2024
1 parent 8cbb1b6 commit 7a2d7dc
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 @@ -55,7 +55,7 @@ end
--- @return integer the shiftwidth value of bufnr
local function get_shiftw_value(bufnr)
local handle = find_buffer_by_handle(bufnr, ffi.new('Error'))
return handle and get_sw_value(handle) or 0
return get_sw_value(handle)
end

--- store the line data in snapshot and update the blank line indent
Expand Down Expand Up @@ -166,7 +166,7 @@ local function on_line(_, _, bufnr, row)
for i = 1, sp.indent - 1, context.step do
local col = i - 1
local level = math.floor(col / context.step) + 1
if not vim.bo[bufnr].expandtab or context.is_tab then
if context.is_tab then
col = level - 1
end
if
Expand Down

0 comments on commit 7a2d7dc

Please sign in to comment.