neovim(winbar): show plus sign if buf is modified
This commit is contained in:
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user