From f95809ac8a33c8910c0e19ed7483153f4867c94b Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 28 Nov 2023 11:55:30 +0100 Subject: [PATCH] Tag section --- lua/neogit/buffers/refs_view/init.lua | 1 + lua/neogit/buffers/refs_view/ui.lua | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lua/neogit/buffers/refs_view/init.lua b/lua/neogit/buffers/refs_view/init.lua index e5feab2c4..e682cd770 100644 --- a/lua/neogit/buffers/refs_view/init.lua +++ b/lua/neogit/buffers/refs_view/init.lua @@ -4,6 +4,7 @@ local popups = require("neogit.popups") local CommitViewBuffer = require("neogit.buffers.commit_view") local config = require("neogit.config") local notification = require("neogit.lib.notification") +local util = require("neogit.lib.util") --- @class RefsViewBuffer --- @field is_open boolean whether the buffer is currently shown diff --git a/lua/neogit/buffers/refs_view/ui.lua b/lua/neogit/buffers/refs_view/ui.lua index 609fb69ff..80516a41a 100644 --- a/lua/neogit/buffers/refs_view/ui.lua +++ b/lua/neogit/buffers/refs_view/ui.lua @@ -82,10 +82,12 @@ local function section(refs, heading, head) table.insert(rows, row { text("") }) - return col({ - row(util.merge(heading, { text.highlight("NeogitGraphWhite")(string.format(" (%d)", #refs)) })), - col(rows), - }, { foldable = true }) + return col.tag("Section")({ + row.tag("SectionHeading")( + util.merge(heading, { text.highlight("NeogitGraphWhite")(string.format(" (%d)", #refs)) }) + ), + col.tag("SectionBody")(rows), + }, { foldable = true, folded = false }) end function M.Branches(branches, head)