<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 28 Aug 2016, at 16:56, Ian Dai wrote:</p>

<p dir="auto"></p></div>
<div style="white-space:pre-wrap"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><div dir="auto"> 2. Expected result
</div><div dir="auto">    - Click the file to open it, you should see file name show at top
</div><div dir="auto">correctly.
</div></blockquote></div>
<div style="white-space:normal">

<p dir="auto">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?</p>

<p dir="auto">Looking at how the system handles this, it does not :)</p>

<p dir="auto">For example after <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">touch $'foo\nbar.txt'</code> this is what I see in Finder:</p>

<p dir="auto"><img src="cid:D8839931-45AB-4084-BA12-33016F8071AA@textmate.org" alt="" title="PastedImage.png"></p>

<p dir="auto">And this is how it shows in TextEdit’s title bar:</p>

<p dir="auto"><img src="cid:4DA665C2-4E7E-415C-B896-C78BF5F06D24@textmate.org" alt="" title="PastedImage.png"></p>

<p dir="auto">For the records TextMate uses <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">NSFileManager</code>’s <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">displayNameAtPath:</code> to obtain the display name which does things like replace <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">:</code> with <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">/</code>, hide extension, localize the display name, etc.</p>

<p dir="auto">I think it would be more appropriate to report this to Apple and request the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">displayNameAtPath:</code> also handle newlines.</p>
</div>
</div>
</body>
</html>