This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 222112 - Enabling line wrap causes wrapping the first line of a block in unnecessary lines
Summary: Enabling line wrap causes wrapping the first line of a block in unnecessary l...
Status: RESOLVED DUPLICATE of bug 205840
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-14 13:23 UTC by maxceem
Modified: 2012-11-21 07:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test js file to reproduce the issue (427 bytes, application/x-javascript)
2012-11-14 13:23 UTC, maxceem
Details
Illustration when line wrap is off (47.72 KB, image/png)
2012-11-14 13:30 UTC, maxceem
Details
Illustration when line wrap is "after words" (48.16 KB, image/png)
2012-11-14 13:31 UTC, maxceem
Details
Illustration when line wrap is "anywhere" (47.57 KB, image/png)
2012-11-14 13:32 UTC, maxceem
Details

Note You need to log in before you can comment on or make changes to this bug.
Description maxceem 2012-11-14 13:23:16 UTC
Created attachment 127776 [details]
Test js file to reproduce the issue

I'm tolking about new function of showing the first line of some block when the first line is outside of a visible screen. It works good when line wrap is disabled. But when line wrap is enabled the line which is shown upside is wrapped into several unnecessary lines.

I've created simple js file to reproduce the issue which is attached to the ticket.
Steps to reproduce the issue:
1. Enable wrap line in JS editor (Tools->Options->Editor, Line Wrap should be set to either "after words" or "anywhere"
2. Open attached test.js file in the NetBeans IDE
3. Scroll 1 line down just to make the first line outside visible screen
4. Put cursor just after closing brecket (line 7 column 2)
5. The first line of function definition should apper now at the top of the editor screen and it will be wrapped into 3 lines in case of Line Wrap option is set to "after words" or into 5 lines in case of Line Wrap option is set to "anywhere"
Comment 1 maxceem 2012-11-14 13:30:21 UTC
Created attachment 127777 [details]
Illustration when line wrap is off

When line wrap is off everything is ok.
Comment 2 maxceem 2012-11-14 13:31:53 UTC
Created attachment 127778 [details]
Illustration when line wrap is "after words"

When line wrap is set to "after words" the first line is wrapped into 3 lines.
Comment 3 maxceem 2012-11-14 13:32:53 UTC
Created attachment 127779 [details]
Illustration when line wrap is "anywhere"

When line wrap is set to "anywhere" the first line is wrapped into 5 lines.
Comment 4 Jan Lahoda 2012-11-16 09:03:46 UTC
Svata, you were looking into something like this while ago, right?
Comment 5 Svata Dedic 2012-11-21 07:50:23 UTC
Yes, the popup is created in the same way as e.g. popup showing folded code. This defect seems to have the same cause as issue #205840

*** This bug has been marked as a duplicate of bug 205840 ***