From a86c5e3bc59b1904adb7aff6bbe9507327da1595 Mon Sep 17 00:00:00 2001 From: nick22985 Date: Sat, 11 May 2024 02:28:03 +1000 Subject: [PATCH] feat: oil working with git buttons --- lua/presence/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/presence/init.lua b/lua/presence/init.lua index f270433..009b46e 100644 --- a/lua/presence/init.lua +++ b/lua/presence/init.lua @@ -724,6 +724,10 @@ end -- Get either user-configured buttons or the create default "View Repository" button definition function Presence:get_buttons(buffer, parent_dirpath) + if parent_dirpath ~= nil and parent_dirpath:find("^oil://") then + parent_dirpath = parent_dirpath:gsub("oil://", "") + end + -- User configured a static buttons table if type(self.options.buttons) == "table" then local is_plural = #self.options.buttons > 1