errael opened a new pull request #2482:
URL: https://github.com/apache/netbeans/pull/2482


   In ide/editor/lib/BaseCaret there's
   ```
   newCaretBounds = c.getUI().modelToView(
           c, offset, Position.Bias.Forward);
   // [TODO] Temporary fix - impl should remember real bounds computed by 
paintCustomCaret()
   if (newCaretBounds != null) {
       newCaretBounds.width = Math.max(newCaretBounds.width, 2);
   }
   ```
   When offset is sitting on a TAB character,
   editor.lib2's TabView's `modelToViewChecked(int offset, Shape alloc,...` does
   ```
           mutableBounds.width = 1;
           return mutableBounds;
   ```
   So the min of 2 applies and the caret drawing code gets a graphics context 
with clip width of 2.
   
   This causes a drawing problem for the caret which can be ovserved in 
NetBeans. The problem may be exacerbated for plugins that provide their own 
caret. This fix provides a workaround that can be used by plugins until (if) 
the problem is addressed.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to