feat: request permission button group (#2685)

This commit is contained in:
yetone
2025-09-04 15:35:40 +08:00
committed by GitHub
parent 4ac4c8ed3f
commit 10e0312ec4
6 changed files with 394 additions and 125 deletions

View File

@@ -39,10 +39,13 @@ function M:get_section_pos(section_index, offset)
for i = 1, section_index - 1 do
if i == section_index then break end
local section = self.sections[i]
col_start = col_start + #section
local text = type(section) == "table" and section[1] or section
col_start = col_start + #text
end
return { offset + col_start, offset + col_start + #self.sections[section_index] }
local current = self.sections[section_index]
local text = type(current) == "table" and current[1] or current
return { offset + col_start, offset + col_start + #text }
end
function M:__tostring()
@@ -59,4 +62,8 @@ function M:__eq(other)
return vim.deep_equal(self.sections, other.sections)
end
function M:bind_events(ns_id, bufnr, line) end
function M:unbind_events(bufnr, line) end
return M