neovim(winbar): show plus sign if buf is modified

This commit is contained in:
2022-09-11 14:48:12 +03:00
parent c4d3f46bcb
commit c391b15382

View File

@@ -42,6 +42,7 @@ local filename = {
local filename = vim.fn.expand("%:t") local filename = vim.fn.expand("%:t")
local fileext = vim.fn.expand("%:e") local fileext = vim.fn.expand("%:e")
local icon = devicons.get_icon(filename, fileext) local icon = devicons.get_icon(filename, fileext)
local modified = vim.bo.modified
if filetype == "fugitive" then if filetype == "fugitive" then
icon = devicons.get_icons().git.icon icon = devicons.get_icons().git.icon
@@ -51,6 +52,10 @@ local filename = {
return filename return filename
end end
if modified then
return icon .. " " .. filename .. " " .. "[+]"
end
return icon .. " " .. filename return icon .. " " .. filename
end, end,
} }