fix: opening oil from netrw defaults to netrw directory (#148)

This commit is contained in:
Steven Arcangeli 2023-08-09 00:03:41 -07:00
parent a05b2eb54d
commit 887bb4a8b6

View file

@ -170,6 +170,9 @@ M.get_url_for_path = function(dir)
local config = require("oil.config")
local fs = require("oil.fs")
local util = require("oil.util")
if vim.bo.filetype == "netrw" and not dir then
dir = vim.b.netrw_curdir
end
if dir then
local scheme = util.parse_url(dir)
if scheme then