Skip to content

Commit

Permalink
perf: luajit tips optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Jun 3, 2024
1 parent 75a9bb6 commit 6e46fe7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lua/indentmini/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ local function non_or_space(row, col)
end

local function find_in_snapshot(lnum)
if not cache.snapshot[lnum] then
cache.snapshot[lnum] = { get_indent_lnum(lnum), line_is_empty(lnum) }
end
cache.snapshot[lnum] = cache.snapshot[lnum] or { get_indent_lnum(lnum), line_is_empty(lnum) }
return unpack(cache.snapshot[lnum])
end

Expand Down

0 comments on commit 6e46fe7

Please sign in to comment.