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

Tab-formatting failure: First tab after an ANSI code is only 1 char long instead of 8 #41

Open
Ecconia opened this issue Oct 14, 2019 · 4 comments
Assignees
Projects

Comments

@Ecconia
Copy link

Ecconia commented Oct 14, 2019

Issue:

  • A properly aligned tab which should have its maximum allowed tabwidth is only 1 char long, when its after an ANSI code. Following tabs will fix this issue.

Expected behavior:

  • A tab which is properly aligned should have its maximum allowed tablwidth, no matter if its after an ANSI code.

Confirmation:

  • Expected behavior can be confirmed by simply running failing code in any common linux terminal.

Testcase:

  • Simple test to cause the behavior. In this case the tabwidth is 8 chars. The first tab will be 1 char long. The second tab behaves normal again and has a proper width (7 chars) to jump back into the normal tab-grid again.
    System.out.println("\033[93m\t\t<");

Ansi Console Version: 1.3.5.201612301822
Eclipse:

  • Version: 2019-09 R (4.13.0)
  • Build id: 20190917-1200
@mihnita
Copy link
Owner

mihnita commented Oct 15, 2019

I don't see any problem.

I've tried this:

	System.out.println("\t\t<");
    	System.out.println("\033[93m\t\t<"); // the line from the bug report
    	System.out.println("\t\t<");
    	System.out.println("\033[m\t\t<");
    	System.out.println("123456789012345678901234567890");

I get this:

		<
		<     => this one is yellow
		<     => this one is yellow
		<
123456789012345678901234567890

The only difference is (I think) Eclipse, I am on:
Version: 2018-12 (4.10.0)
Build id: 20181214-0600
I will install 20190917-1200 to try it.

Other info (not sure if relevant or not): Windows 10, and Eclipse with Dark theme.

@Ecconia
Copy link
Author

Ecconia commented Oct 15, 2019

I am using dark theme. Am running Ubuntu

@mihnita
Copy link
Owner

mihnita commented Oct 15, 2019

Darn...
I can see it in Version: 2019-09 R (4.13.0) (Build id: 20190917-1200)
:-(

Although I doubt there is much I can do...
This is Eclipse braking things.
This worked just fine since 2012, Eclipse 3.8 :-(

I'll try some more things, and then probably file a bug against Eclipse...

@Ecconia
Copy link
Author

Ecconia commented Oct 15, 2019

Thanks for investigating it, I should have tested it on my other older eclipse too.

I also looked into your code and that certainly looks like it's not at fault.

For now I am using a workaround so I am fine. I better get rid of that version of eclipse by upgrade or downgrade.

@mihnita mihnita added this to Low priority in Status Jan 28, 2020
@mihnita mihnita self-assigned this Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status
  
Low priority
Development

No branches or pull requests

2 participants