-
Notifications
You must be signed in to change notification settings - Fork 185
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
Better handling of [TAB] (ASCII 9) character. #1182
Comments
Duplicate of #1020 and see explanations there. It's certainly not about referring to 80 columns, behaviour is the same with any terminal width. It's about compatibilty. Should it be changed, it might break other software, so the fact that it is astonishing behaviour indeed does not necessarily imply it should be "fixed". Please also consider that there does not seem to be any terminal around that would handle this differently, for the reasons mentioned. If the Go system has a problem with that it's a Go bug, please report it there as they may be ignoring established terminal behaviour or making invalid assumptions about it. |
Lol... The funny thing is, I rewrote the issue description 3-4 times before submitting, and at least 2 of those started with how I regretted this would be a breaking change. (I eventually decided the issue report was to point out the issue, without waxing on about possible solutions.) First off, this is not an issue with Secondly, Thirdly, while the cause is the same, I think this is a distinct issue from #1020:
|
Whether this is distinct from 1020 (which I doubt) or not could be discussed if you upload a piece of text (screen log, which can be |
I completely agree that compatibility trumps all... I mentioned "Distinct from" can mean different things. In this case I was referring to the effects of
being distinct from
not their cause, which likely is shared. The next time I'm in a non-proprietary go project with tests, I'll post a dump of the test output for your review. but I don't know if this will happen this week. I will point out that both Because I value backwards compatibility, that is why I suggested a configuration option to treat the first 80 columns specially (as is the current, compatible, behavior)... The non-compatible behavior would be to not treat the left 80 columns as the only screen-region with tab stops. I understand, at this time, that we're simply just discussing options. |
I'm not sure what exactly you are complaining about in this issue, but I do know there was a bug in the tab handling in the Windows console, which is quite likely still present if you're using an older version of Windows 10 (like pre Windows 11). So just be aware that what you're seeing there is probably not the way the Windows console works anymore, and may not be a great example to use as something that matches your expected behavior. |
Here is a file (In this case, from This file is simply a patch against project Jarcoal's httpmock package for golang on GitHub to give the output above. (I had to make the package's pathname long enough to produce HTs past column 80): httpmock_long_pkg_path.diff.txt UPDATE: UPDATE2: |
There is an issue with TAB when output in the "pending wrap" state, i.e. after the last column - the line will wrap on the next character but the TAB will be skipped. Output your example file at terminal width 89 to see it. |
I'm still investigating this intermittently, but it appears to be an interaction between my bash shell prompt and window resizing the window... I'll include my prompt string here for reference, but I haven't exactly identified the issue exactly yet.
I will post again when I know more. |
Released 3.6.3. |
xterm
Compatibility Issue(Specifically, there is an issue with preserving
xterm
behavior)When a HT character is printed beyond the terminal's 79th character column the cursor is advanced to the end of the current line; resulting on the next text output to be line-broken at the second character. This behavior at least violates the "Principle of least astonishment" if nothing else.
You could argue that you're emulating physical terminals, which were never wider than 80 columns, but that sounds like a cop-out.
I've personally found this behavior most annoyingly noticeable in the output of the Go programming language's built-in test suite, but I imagine outputting HT characters that far right in output is somewhat uncommon.
The text was updated successfully, but these errors were encountered: