Skip to content
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

Line wrapping with tab characters #18

Open
maneandrea opened this issue Dec 5, 2022 · 0 comments
Open

Line wrapping with tab characters #18

maneandrea opened this issue Dec 5, 2022 · 0 comments

Comments

@maneandrea
Copy link

When there is a \t character, multitail considers it as if it occupies a single space and so the line wrapping is wrong. Suppose we have a file with a tab, the text "some text" and then a very long sequence of "."

Expected

< tab character >some text..........|| other column
rest of file                        || other line of other column

Actual

< tab character >some text..........|| other column
................                    || other line of other column
rest of file                        || etc ...

Notice that in the actual case, the sequence of "." stops exactly one space before the end of the <tab character>, meaning that when multitail computes the required length it considers <tab character> to be long 1 instead of its actual length (16 in this example but 8 in real life).

Here is the culpirit mt.c#L392. strlen counts \t as 1. I wouldn't know the best way to fix this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant