From 0e53d402219c74d351fffb18d97d7e350f87bfd8 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Sat, 28 Jan 2023 15:56:58 -0800 Subject: [PATCH] fix: oil can open when terminal is focused (#51) --- lua/oil/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/oil/init.lua b/lua/oil/init.lua index d9b4868..0592cf2 100644 --- a/lua/oil/init.lua +++ b/lua/oil/init.lua @@ -190,6 +190,12 @@ M.get_buffer_parent_url = function(bufname) local parent_url = util.addslash(scheme .. parent) return parent_url, basename else + -- TODO maybe we should remove this special case and turn it into a config + if scheme == "term://" then + path = path:match("^(.*)//") + return config.adapter_to_scheme.files .. util.addslash(path) + end + local adapter = config.get_adapter_by_scheme(scheme) local parent_url if adapter and adapter.get_parent then