Yes; the getLineWrapType() != LineWrapType.NONE check is sufficient. 
Previously, getLineContinuationCharTextLayout would never return null in 
practice--only if the font could not display the line continuation character or 
its alternate. And if that ever happened, there would have been an NPE when 
WrapInfo calls paintTextLayout with the null layout.

I changed this so that getLineContinuationCharTextLayout can now return null 
without error (and added Javadoc to that effect). Rather than disabling line 
wrapping altogether, this simply avoids displaying displaying the line 
continuation character. Then I made this the default, unless the user opts to 
display hidden characters (paragraph marks etc).

I just looked over the call sites of getLineContinuationCharTextLayout  again; 
they seem to do the right thing.

[ Full content available at: 
https://github.com/apache/incubator-netbeans/pull/598 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to