Open OlegFedko opened 1 year ago
It just so happens that I have read the code, and in fact klogg intentionally replaced tab with space in the original text. i think the possible reasons are as follows
It looks, that untabify() function is wrong: https://github.com/variar/klogg/blob/8a5eff03a8f22630a703bd8f848a4239a735aa91/src/logdata/include/linetypes.h#L317-L324
totalSpaces should be used if replace() is made in a copy of the string and indexOf() is called for original one. But actually it is made on same string.
Your analysis is correct, I checked the modification history and it seems that the behavior changed during an optimization. I tried to revert the function to the pre-modification version and it ran just as expected.
Here is the modification at that time: perf: less copying on untabify
I removed totalSpaces from the current code, and it worked fine!
That is indeed a bug. I wonder if result of getUntabifiedLength
matches the version with the bug or without )
That is indeed a bug. I wonder if result of
getUntabifiedLength
matches the version with the bug or without )
Wait a minute. I'll check.
That is indeed a bug. I wonder if result of
getUntabifiedLength
matches the version with the bug or without )
After #664 getUntabifiedLength
works correctly, before it had been an incorrect value
Should be fixed in 24.11.0.1662+
There is a log file with tab char used as separator:
I'm expect that tab stop points are aligned across lines, like shown above.
In fact "Info" column is correctly aligned. But "Some text" column position is related to second column size. It looks like this:
Screenshot: https://snipboard.io/h3kXe4.jpg
Useful extra information