Compare commits
2 Commits
29b01b8289
...
21efa37611
Author | SHA1 | Date | |
---|---|---|---|
21efa37611 | |||
7337186ca7 |
@ -107,7 +107,7 @@ function BraceRange.find(brace_pair)
|
||||
end
|
||||
end
|
||||
|
||||
function BraceRange.find_all()
|
||||
function BraceRange.find_closest()
|
||||
local brace_range_compare = function(brace_range_1, brace_range_2)
|
||||
local cursor = Cursor:get()
|
||||
|
||||
@ -139,5 +139,7 @@ function BraceRange.find_all()
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user