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 205829 - Whitespace highlighting fills window
Summary: Whitespace highlighting fills window
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P2 normal with 4 votes (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 209295 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-02 09:48 UTC by pjdm
Modified: 2012-05-18 22:29 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (4.59 KB, image/png)
2012-01-26 20:37 UTC, wrprice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pjdm 2011-12-02 09:48:09 UTC
I've installed NetBeans 7.1 RC1; at install time it imported my 7.0 settings. One of my settings in Fonts & Colors > Syntax is to set whitespace to Strike Through, Light Gray. In the preview the example looks as I expect (and as it appeared in 7.0), with leading spaces having a light gray strike through.

However, 7.1 RC1 has the gray strike through extending to the right side of the editor window on every line, even though there are no trailing spaces.

I like visible whitespace, but not to this extent. Is this a deliberate change? If so, am I missing an option to not add the trailing highlighting?

(I tried restoring the standard settings and changing the highlighting again, but the same thing happened.) 

Product Version = NetBeans IDE 7.1 RC1 (Build 201111242103)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) 64-Bit Server VM 19.1-b02
Comment 1 pjdm 2011-12-06 07:30:11 UTC
This bug still exists in RC2.
Comment 2 Miloslav Metelka 2011-12-06 08:20:36 UTC
I guess not only the leading whitespace but also whitespace anywhere on the line would appear with strike-through, right?
Since '\n' is a whitespace it should in fact highlight the newline char too. Since the newline view renders end of newline view then it's expected.
I may force the newline view to have default attributes which seems to me as a best solution.
Comment 3 pjdm 2011-12-06 08:40:14 UTC
(In reply to comment #2)

> I guess not only the leading whitespace but also whitespace anywhere on the
> line would appear with strike-through, right?

The preview text area in Fonts & Colors -> Syntax for Language: Java shows the correct rendition of the whitespace elements.

There is no need for visible \n (which looks ugly anyway) because trailing spaces render with strikethrough, as shown in the preview in the line after "public class".

I don't know what you mean by "newline view".
Comment 4 wrprice 2012-01-26 20:35:06 UTC
I can confirm the same behavior on my upgraded (7.0.1 -> 7.1) environment.  I use a light gray wave-underline instead of strike-through and it is present the entire width of the editor pane, even after the last character on the line (whitespace or not).

Windows 7 Enterprise, x86_64
NetBeans 7.1 release

P.S. I really wish there was a "trailing whitespace" option (which is what I really care about) instead of simply all whitespace... but that's a feature request.
Comment 5 wrprice 2012-01-26 20:37:56 UTC
Created attachment 115284 [details]
Screenshot

Screenshot attached.
Comment 6 wrprice 2012-01-26 21:11:43 UTC
Filed RFE under bug 207793 for treating trailing whitespace (actually present in the file) different from other whitespace on the line.
Comment 7 steady 2012-04-03 13:59:39 UTC
This bug still exists in NetBeans IDE Dev (Build 201204030400) for whitespaces in Batch File, C, C++, C/C++ Header, Cascading Style Sheet, Fortran, Makefile, SQL and Shell Script, but not for JavaScript and Properties.

This is the regression since 7.0 or 7.1.
Comment 8 Miloslav Metelka 2012-05-14 14:55:53 UTC
Newline chars no longer colored by syntax highlighting.
http://hg.netbeans.org/jet-main/rev/8274a4e6a571
Comment 9 Quality Engineering 2012-05-15 10:11:58 UTC
Integrated into 'main-golden', will be available in build *201205150400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/8274a4e6a571
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #205829 - Whitespace highlighting fills window.
Comment 10 Miloslav Metelka 2012-05-18 08:09:19 UTC
*** Bug 209295 has been marked as a duplicate of this bug. ***
Comment 11 wrprice 2012-05-18 22:29:49 UTC
I can verify that the whitespace formatting issue is now resolved for me.  Thanks!

Product Version: NetBeans IDE Dev (Build 201205180400)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)