fix: handle opening oil from buffers with foreign schemes (#256)
This commit is contained in:
parent
71b1ef5edf
commit
22ab2ce1d5
1 changed files with 5 additions and 0 deletions
|
|
@ -212,6 +212,11 @@ M.get_buffer_parent_url = function(bufname, use_oil_parent)
|
|||
return config.adapter_to_scheme.files .. util.addslash(path)
|
||||
end
|
||||
|
||||
-- This is some unknown buffer scheme
|
||||
if not config.adapters[scheme] then
|
||||
return vim.fn.getcwd()
|
||||
end
|
||||
|
||||
if not use_oil_parent then
|
||||
return bufname
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue