1

Compare commits

...

2 Commits

Author SHA1 Message Date
21efa37611 Fix name 2024-04-21 22:07:39 -07:00
7337186ca7 Fix return 2024-04-21 22:07:24 -07:00

View File

@ -107,7 +107,7 @@ function BraceRange.find(brace_pair)
end end
end end
function BraceRange.find_all() function BraceRange.find_closest()
local brace_range_compare = function(brace_range_1, brace_range_2) local brace_range_compare = function(brace_range_1, brace_range_2)
local cursor = Cursor:get() local cursor = Cursor:get()
@ -139,5 +139,7 @@ function BraceRange.find_all()
end end
end end
return vim.fn.sort(brace_ranges, brace_range_compare) if #brace_ranges > 0 then
return vim.fn.sort(brace_ranges, brace_range_compare)[1]
end
end end