[ 
https://issues.apache.org/jira/browse/NETBEANS-5070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17256636#comment-17256636
 ] 

Matthias Bläsing commented on NETBEANS-5070:
--------------------------------------------

Sorry - but I don't see the problem with the assumption, that the width of a 
character is fixed. For a given resolution (DPI) and a given monospaced font I 
expect all characters to have the same width. From my POV the terminal needs to 
be updated when the DPI or the font changes. 

When displays with different resolutions are used (not sure how swing handles 
it) and the widget is visible on both screens, then the story changes, here it 
would be interesting to know what swing does in that case.

> Partitial fix for NETBEANS-819 breaks terminal
> ----------------------------------------------
>
>                 Key: NETBEANS-5070
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5070
>             Project: NetBeans
>          Issue Type: Bug
>          Components: cnd - Terminalemulator
>    Affects Versions: Next
>            Reporter: Matthias Bläsing
>            Assignee: Michal Hlavac
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 12.3
>
>         Attachments: 99895991-55dd6080-2c41-11eb-9019-c7c96214a802.gif, 
> Bildschirmfoto_2020-12-30_17-07-10.png
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The fix for shifted cursor in terminal windows commited by:
> [https://github.com/apache/netbeans/pull/2509]
> Breaks text selection (video provided by [~lkishalmi] ):
> !99895991-55dd6080-2c41-11eb-9019-c7c96214a802.gif!
> I also saw that behavior on windows and on linux I observed flaky behavior of 
> the terminal and this is matched by exceptions:
> {quote}SEVERE [global]
> java.lang.ArrayIndexOutOfBoundsException: Index 134 out of bounds for length 
> 134
>       at 
> java.desktop/sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:506)
>       at org.netbeans.lib.terminalemulator.Line.stringWidth(Line.java:159)
>       at org.netbeans.lib.terminalemulator.Sel.paint(Sel.java:407)
>       at org.netbeans.lib.terminalemulator.Sel.access$000(Sel.java:71)
>       at org.netbeans.lib.terminalemulator.Sel$2.visit(Sel.java:436)
>       at org.netbeans.lib.terminalemulator.Buffer.visitLines(Buffer.java:205)
>       at org.netbeans.lib.terminalemulator.Term.visitLines(Term.java:912)
>       at org.netbeans.lib.terminalemulator.Sel.paint(Sel.java:434)
>       at org.netbeans.lib.terminalemulator.Term.do_paint(Term.java:3175)
>       at org.netbeans.lib.terminalemulator.Screen.paint(Screen.java:168)
>       at 
> java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
>       at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
>       at 
> java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
>       at 
> java.desktop/javax.swing.JComponent.paint(JComponent.java:1083){quote}
> So we either need a quick fix for this or we need to rollback the referenced 
> commit.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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