Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippOesch committed Sep 16, 2024
1 parent c9622bd commit c4043eb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lua/oil/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,7 @@ M.get_title = function(winid)
path = fs.posix_to_os_path(path)

if config.float.relative_win_title then
local cwd = vim.fn.getcwd()
title = vim.fn.fnamemodify(path, ":p")

if title:sub(1, #cwd) == cwd then
title = title:gsub(cwd, ".", 1)
end
title = vim.fn.fnamemodify(path, ":p:~:.")
else
title = vim.fn.fnamemodify(path, ":~")
end
Expand Down

0 comments on commit c4043eb

Please sign in to comment.