Hello,
I'm new to TextMate and new to the list.
I have noticed the following bug (?): I have a list of words in a text file. Every word in it's own line. There are 85 words, but the Statistics of the Document (Text-Bundle) shows 84 lines, because there is no line change (EOL) at the end of the last word. So the result is not correct (and, yes, it makes the difference for me, because I had to determine the exact number of the words and than I told the wrong number).
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?
Joanna
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 :)
-Jacob
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
Hello Jacob,
Jacob Rus-4 wrote:
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. [...]
Sorry that didn't get into today's update. If you check the Text bundle out from SVN tomorrow, it should hopefully be fixed. :)
I'll maybe try it :) Thank you. (Actually only because I'm curious; I don't need the correct number of lines anymore ;)
J.