fix: opening oil from netrw defaults to netrw directory (#148)
This commit is contained in:
parent
a05b2eb54d
commit
887bb4a8b6
1 changed files with 3 additions and 0 deletions
|
|
@ -170,6 +170,9 @@ M.get_url_for_path = function(dir)
|
||||||
local config = require("oil.config")
|
local config = require("oil.config")
|
||||||
local fs = require("oil.fs")
|
local fs = require("oil.fs")
|
||||||
local util = require("oil.util")
|
local util = require("oil.util")
|
||||||
|
if vim.bo.filetype == "netrw" and not dir then
|
||||||
|
dir = vim.b.netrw_curdir
|
||||||
|
end
|
||||||
if dir then
|
if dir then
|
||||||
local scheme = util.parse_url(dir)
|
local scheme = util.parse_url(dir)
|
||||||
if scheme then
|
if scheme then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue