On 28 Aug 2016, at 16:56, Ian Dai wrote:

2. Expected result
- Click the file to open it, you should see file name show at top
correctly.

Can you define “correctly”? Would you expect tabs to grow to twice the height? And the same for file browser rows? Or would you want TextMate to render the newline with a glyph?

Looking at how the system handles this, it does not :)

For example after touch $'foo\nbar.txt' this is what I see in Finder:

And this is how it shows in TextEdit’s title bar:

For the records TextMate uses NSFileManager’s displayNameAtPath: to obtain the display name which does things like replace : with /, hide extension, localize the display name, etc.

I think it would be more appropriate to report this to Apple and request the displayNameAtPath: also handle newlines.