Skip to content

Commit

Permalink
fix: only escape % when used in format string
Browse files Browse the repository at this point in the history
Fix #129
  • Loading branch information
luukvbaal committed Jun 15, 2024
1 parent 8f618bc commit d6f7f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/statuscol.lua
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ function M.setup(user)
local text = segment.text[j]
if type(text) == "string" then
if text:find("%%s") then setscl = false end
text = text:gsub("%%", "%%%%")
if type(condition) == "boolean" then text = text:gsub("%%", "%%%%") end
end
if type(text) == "function" or type(condition) == "function" then
formatstr = formatstr.."%s"
Expand Down

0 comments on commit d6f7f54

Please sign in to comment.