Skip to content

Commit

Permalink
fix: escape filename after it has been shortened (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozymohliad authored Dec 26, 2023
1 parent 4040b70 commit f76d9b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/lualine/components/filename.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ M.update_status = function(self)
data = vim.fn.expand('%:t')
end

data = modules.utils.stl_escape(data)

if data == '' then
data = self.options.symbols.unnamed
end
Expand All @@ -113,6 +111,8 @@ M.update_status = function(self)
table.insert(symbols, self.options.symbols.newfile)
end

data = modules.utils.stl_escape(data)

return data .. (#symbols > 0 and ' ' .. table.concat(symbols, '') or '')
end

Expand Down

0 comments on commit f76d9b6

Please sign in to comment.