<html><body style="font-family: Helvetica,Arial,sans-serif; font-size: 12px;">Let's take the first line shown, which says "You can define your custom view property" and so on. That is _start_ of a paragraph consisting of 186 characters followed by (and ending with) the target string.<div><br></div><div>Similarly the second line shown is the _start_ of a paragraph consisting of 184 characters followed by (and ending with) the target string.</div><div><br></div><div>So maybe this is an edge case of some sort?</div><div><br></div><div>m.</div><div><br><div style="font-family:Consolas;font-size:14px;">--</div><div style="font-family:Consolas;font-size:14px;">matt neuburg, phd = http://www.apeth.net/matt/<br>pantes anthropoi tou eidenai oregontai phusei<br>Programming iOS 10! http://shop.oreilly.com/product/0636920055235.do<br>iOS 10 Fundamentals! http://shop.oreilly.com/product/0636920055211.do<br>RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html</div><div style="font-family:Consolas;font-size:14px;"><br></div><br><blockquote class="atmailquote"><br>----- Original Message -----<br><div id="origionalMessageFromField" style="width:100%;display:inline;background:rgb(228,228,228);"><div style="display:inline;font-weight:bold;">From:</div> "TextMate users" <textmate@lists.macromates.com></div><br><div id="origionalMessageToField" style="display:inline;font-weight:bold;">To:</div>"TextMate users" <textmate@lists.macromates.com><br><div id="origionalMessageSentField" style="display:inline;font-weight:bold;">Cc:</div><br><div style="display:inline;font-weight:bold;">Sent:</div>Sun, 25 Feb 2018 09:28:57 +0700<br><div id="origionalMessageSubjectField" style="display:inline;font-weight:bold;">Subject:</div>[TxMt] Re: global find dialog not showing occurrences<br><br><br><div style="font-family:sans-serif;"><div>
<p>On 22 Nov 2017, at 2:46, Matt Neuburg wrote:</p>
</div>
<div><blockquote style="border-left:2px solid #777;color:#777;margin:0 0 5px;padding-left:5px;"><p>I think I've mentioned this before, but I do wish it were fixed so I'm mentioning it again. Sometimes the global Find dialog shows (correctly) that my search text occurs on a certain line of a certain file but doesn't show the occurrence. In this screen shot, the first two occurrences are listed but the found text is at the end of the line whereas what we are being shown is the start of the line.</p>
</blockquote></div>
<div>
<p>I can’t tell from the screenshot, but roughly how many characters are visible?</p>
</div>
<div><blockquote style="border-left:2px solid #777;color:#777;margin:0 0 5px;padding-left:5px;"><p>As the third line shows, this does work sometimes. It's a great feature and I've come to rely on it, so I do wish it worked all the time.</p>
</blockquote></div>
<div>
<p>The way it currently works is that it will not show more than 500 characters from the matched line, and if more than 200 characters precede the match, it will truncate the start of the line to keep it below 200.</p>
<p>The reason it doesn’t show the full line and make it horizontally scrollable is twofold:</p>
<ol><li value="1"><p>Horizontally scrolling table views require us to measure the width of each line (in pixels), to calculate the width of the scroller, this is expensive so it does not work well when people do searches that returns hundreds of thousands of results or even numbers in the millions.</p></li>
<li value="2"><p>Including the full line in the result (rather than 500 bytes) is also a performance problem when people have extremely long lines (like megabytes) and there are hundreds or thousands of matches in such line, as the table view would show the same line (that takes up megabytes) hundreds or thousands of times, leading to accumulated memory usage in the gigabytes, so again a performance issue.</p></li>
</ol><p>That said, it should ideally show the matched portion of the line, which is why I would like to know the exact number of characters preceding the match and how many of them are displayed, to see if the current heuristic works and just needs tweaking.</p>
</div>
</div>
</blockquote></div></body></html>