[
https://issues.apache.org/jira/browse/NETBEANS-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447100#comment-16447100
]
Gili commented on NETBEANS-235:
-------------------------------
[^2018-04-22 at 00-57-36.mp4] [~lkishalmi] Here is a minimal testcase for
reproducing the problem:
# Create a Java project with:
{code:java}
public class CopyPasteBug {
public static void main(String[] args) {
System.out.println("Mary had a little lamb, little lamb, little lamb.");
}
}{code}
# Run the application.
# In the output window, select" Mary had a little lamb, little"
# Copy the text into the clipboard
# Paste the text into the editor.
# Notice that "Mary had a little lamb, littl" is pasted (missing an "e" at the
end)
I've attached a video showing this in action.
Now that I think about it, https://issues.apache.org/jira/browse/NETBEANS-264
might be related. I've noticed for a while that the width of certain letters
aren't calculated correctly. This causes project names to get cut off in the
projects tab. Maybe in this case it's causing rendering problems in the output
window. Anyway, let's focus on what we know for sure... if you run the above
testcase you should be able to reproduce the problem. If not, we've got some
environmental differences. If so, I recommend we get someone to test this under
Windows.
> Wrap Text breaks copy/paste of output window
> --------------------------------------------
>
> Key: NETBEANS-235
> URL: https://issues.apache.org/jira/browse/NETBEANS-235
> Project: NetBeans
> Issue Type: Bug
> Components: platform - Output Window
> Affects Versions: 9.0
> Environment: Microsoft Windows [Version 10.0.16299.125]
> DPI scaling: 150%
> java version "9.0.1"
> Java(TM) SE Runtime Environment (build 9.0.1+11)
> Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
> Reporter: Gili
> Priority: Major
> Labels: HiDPI, regression
> Attachments: 2018-04-22 at 00-57-36.mp4
>
>
> Repro steps:
> 1. Run any Java maven program
> 2. (With Wrap Text disabled) Copy text from the output window, paste it into
> another application
> 3. Notice that this works (the text you see selected when you copy is the
> text you get when you paste)
> 4. Enable Wrap Text in the Output Window
> 5. Re-run the application
> 6. Copy text from the output window, paste it into another application.
> 7. Notice that the selected text in Netbeans is not the text that gets
> pasted. Furthermore, if you attempt to select the entire line in the Output
> Window, you will notice that the caret will not go to the end of the line.
> This is because the visual and API offsets are not aligned so when the caret
> goes *near* the end of line visually, it is actually at the end of the line
> as far as the API is concerned. If you copy/paste this fake end-of-line you
> will get the entire line.
> Expected behavior: Consistent behavior when Wrap Text is enabled or disabled.
> 1. We should be able to copy whatever text is visually selected.
> 2. We should be able to select the entire line.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
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