-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\t (tab char) separators aligned incorrectly #663
Comments
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: klogg/src/logdata/include/linetypes.h Lines 317 to 324 in 8a5eff0
totalSpaces should be used if replace() is made in a copy of the string and indexOf() is called for original one. |
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 |
Wait a minute. I'll check. |
After #664 |
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
The text was updated successfully, but these errors were encountered: