mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix(treesitter): handle empty region when logging (#24173)
This commit is contained in:
parent
c7e7f1d4b4
commit
e85e7fc7bc
@ -447,6 +447,9 @@ end
|
||||
---@private
|
||||
---@param region Range6[]
|
||||
local function region_tostr(region)
|
||||
if #region == 0 then
|
||||
return '[]'
|
||||
end
|
||||
local srow, scol = region[1][1], region[1][2]
|
||||
local erow, ecol = region[#region][4], region[#region][5]
|
||||
return string.format('[%d:%d-%d:%d]', srow, scol, erow, ecol)
|
||||
|
Loading…
Reference in New Issue
Block a user