When you try to open a file with a long filename that has a % at the start of one of the path segments, the percent sign will first get escaped and then the path segment that contains it may get shortened to a single character which "unescapes" the percent sign:
Original filename: aaaaaa/bbbbbb/%cccccc/dddddd/file.txt
Shortened filename: a/b/%/d/file.txt instead of a/b/%%/d/file.txt
This bug is likely more common than it may first seem. I found it by jumping to a function definition which was in a java library class with a URL-like filename (it started with jdt://). There were a few \ symbols encoded as %5C that caused lualine to crash.
When you try to open a file with a long filename that has a
%
at the start of one of the path segments, the percent sign will first get escaped and then the path segment that contains it may get shortened to a single character which "unescapes" the percent sign:aaaaaa/bbbbbb/%cccccc/dddddd/file.txt
aaaaaa/bbbbbb/%%cccccc/dddddd/file.txt
a/b/%/d/file.txt
instead ofa/b/%%/d/file.txt
This bug is likely more common than it may first seem. I found it by jumping to a function definition which was in a java library class with a URL-like filename (it started with
jdt://
). There were a few\
symbols encoded as%5C
that caused lualine to crash.