nvim: statusline: Do not set winbar for empty filename
This commit is contained in:
parent
cd50d8f956
commit
6617280944
1 changed files with 3 additions and 1 deletions
|
@ -297,7 +297,9 @@ api.nvim_create_autocmd({"BufWinEnter", "BufFilePost"}, {
|
||||||
-- `:.` Reduces file name to be relative to current directory, if possible.
|
-- `:.` Reduces file name to be relative to current directory, if possible.
|
||||||
local winbar_file = vim.fn.expand('%:.')
|
local winbar_file = vim.fn.expand('%:.')
|
||||||
|
|
||||||
|
if winbar_file ~= '' then
|
||||||
vim.opt_local.winbar = string.format(" %s%s", "%#WinbarFile#", winbar_file)
|
vim.opt_local.winbar = string.format(" %s%s", "%#WinbarFile#", winbar_file)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
api.nvim_create_autocmd({"TermOpen", "TermEnter"}, {
|
api.nvim_create_autocmd({"TermOpen", "TermEnter"}, {
|
||||||
|
|
Loading…
Reference in a new issue