Affects Version/s: None
Fix Version/s: None
Component/s: editor - Painting & Printing
In an editor with line wrap enabled, the cursor is shown at the wrong physical location whenever it is supposed to be located at the end of a wrap line. Instead of being painted at the end of the wrap line, it is painted at the beginning of the following line. This causes the behavior of keyboard shortcuts like "End" and "Up" to seem nonsensical to the user, although they might well be behaving correctly wrt. the physical location of the cursor (the character offset).
1) Go to Options/Preferences->Editor->Formatting, select "All Languages" and set "Line Wrap" to "After words". Click OK.
2) Create a new plain text file and open it in the editor.
3) Type some gibberish into the editor on a single line that is long enough to be broken into several break lines.
4) With the cursor before the first character of the first wrap line in the paragraph, press the "End" key (Command+Right on MacBook keyboards). The cursor appears to move one line down, which is unexpected. From looking at this situation, the user would now assume that they could press the "Up" key to move the cursor back to the previous break line, but this will not change the cursor position (because the cursor is logically on the previous line).
5) Another unexpected example: Pressing Home anywhere in a paragraph will move the cursor to the first character on the paragraph rather than at the first character of the wrap line. (This might indicate that the problem is more than just a paint bug, though.)
Originally reported in BugZilla at https://netbeans.org/bugzilla/show_bug.cgi?id=242115 . Still reproducible on NetBeans 9.0 rc1.