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

Wrap text doesn't work well in CodeAreas #114

Closed
djskrien opened this issue Feb 23, 2015 · 3 comments
Closed

Wrap text doesn't work well in CodeAreas #114

djskrien opened this issue Feb 23, 2015 · 3 comments
Labels

Comments

@djskrien
Copy link

Line wraps of just a few characters don't work properly in CodeAreas. To see the problem, do the following:

Take the JavaKeywords.java demo and insert the following line at line 84:
codeArea.setWrapText(true);
Now run the demo. The following two actions show the problem:

  1. Start typing on a line to make the line long enough to cause wrap. The first few characters that are wrapped overlap the characters on the next line instead of appearing on their own line. Eventually, the wrapped characters appear on their own line, as they should.
  2. Grab the right edge of the window and slowly move it to the left to shrink the width of the window. The text in each line will wrap when the window gets small enough, but at first each line wraps into the next line and overlaps the text on that line. Also the font is messed up. Eventually, as you keep shrinking the width of the window, the wrapped characters appear on their own line but the font is still messed up.

It is my impression that the problem is due to the line numbering. The width of the line number labels on the left side of each line doesn't seem to be taken into account when doing the wrapping.

@ghost
Copy link

ghost commented Feb 23, 2015

Here is a video showing overlapping text lines. Using release 0.6.1 and Java U40 b23


856be546-bad3-11e4-97f6-6d814ab2049c

@TomasMikula
Copy link
Member

There was an issue that the width of the line number was not taken into account for height calculations, as @djskrien pointed out.

@melkhaldi I was not able to reproduce your issue, which does not involve line numbers at all. Can you please check if the issue is still present with 0.6.3 and, if possible, the latest JDK (8u40 build 23)?

@ghost
Copy link

ghost commented Feb 28, 2015

Hi Tomas, seems to work fine. I'll report if I comes across the issue again.
Thanks!

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

No branches or pull requests

2 participants