Skip to content

Commit

Permalink
fix #51
Browse files Browse the repository at this point in the history
  • Loading branch information
zztrieuzz committed Jul 10, 2022
1 parent b03ccbd commit 2bacfa0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lua/windline/components/basic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,14 @@ M.file_icon = function(opt)
end
end

M.file_modified = function(icon)
M.file_modified = function(icon, is_buffer)
if icon and is_buffer then
return function(bufnr)
if vim.bo[bufnr].modified or vim.bo[bufnr].modifiable then
return icon
end
end
end
if icon then
return function()
if vim.bo.modified or vim.bo.modifiable == false then
Expand Down

0 comments on commit 2bacfa0

Please sign in to comment.