feat(buffers): replace $HOME with '~' for paths outside of cwd (#436)
This commit is contained in:
parent
fc30750436
commit
7817c4205e
@ -119,6 +119,8 @@ local function gen_buffer_entry(opts, buf, hl_curbuf)
|
||||
if opts.filename_only then
|
||||
bufname = path.basename(bufname)
|
||||
end
|
||||
-- replace $HOME with '~' for paths ourside of cwd
|
||||
bufname = bufname:gsub("^"..vim.env.HOME, "~")
|
||||
-- add line number
|
||||
bufname = ("%s:%s"):format(bufname, buf.info.lnum>0 and buf.info.lnum or "")
|
||||
if buf.flag == '%' then
|
||||
|
Loading…
Reference in New Issue
Block a user