From 69bd2e0d17ff749eca8fad0dc4b5a2ce23f9f91c Mon Sep 17 00:00:00 2001 From: glepnir Date: Sat, 25 May 2024 16:18:59 +0800 Subject: [PATCH] perf: get indent from snapshot directly --- lua/indentmini/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/indentmini/init.lua b/lua/indentmini/init.lua index f9bbc28..114b2c4 100644 --- a/lua/indentmini/init.lua +++ b/lua/indentmini/init.lua @@ -75,7 +75,7 @@ end local function current_line_range(winid, shiftw) local row = api.nvim_win_get_cursor(winid)[1] - 1 - local indent = get_indent(row + 1) + local indent, _ = find_in_snapshot(row + 1) if indent == 0 then return INVALID, INVALID, INVALID end