[TxMt] Re: Statistics: number of lines incorrect when no empty line at the EOF

Jacob Rus jacobolus at gmail.com
Fri Oct 19 16:04:05 UTC 2007


Jacob Rus wrote:
> Joanna Ludmiła Ryćko wrote:
>> Is it a bug or a feature? ;) Or maybe it isn't possible to count the 
>> number of lines correctly when this last "new line" character is not
>> there?
> 
> Looks like a bug.  Surprised no one noticed it before.  Let me go fix it 
> right now :)

So actually, apparently this was working correctly, but Eridius rewrote 
it at some point to make the code less arcane, and in the process broke 
it a bit.  Given that I still find the code a bit arcane--the first line is…

     wc -lwc|tr \  \\n|grep '..*'|rev|perl -pe 's/\d{3}(?=.)/$&,/g'|rev|

…I offered to just rewrite the thing, but Allan says he'll do it.  Even 
better. :)

Sorry that didn't get into today's update.  If you check the Text bundle 
out from SVN tomorrow, it should hopefully be fixed. :)

-Jacob




More information about the textmate mailing list