Following shows up with jVi, I found them using vim's g$,gj,gk commands which are like $,j,k but operate on screen lines, not text lines.
(((While investigating I found possibly related case that fails with the regular NB keybinding; see after my initial description. )))
Given following in editor (java)
or as a string doc.getText(0,20)
If the curor is positioned at the end of the first line, on the 1 (offset == 4),then
Utilities.getPositionBelow(ep, 4, 0x7fffffff); // MAXINT
returns 4, should return 6. (if 100 is passed instead of MAXINT, it works)
Using MAXINT works ok with regular JEditorPane.
I've worked around this in the jVi code (but, of course, I may not have found all the cases/situations where this is an issue).
=== NetBeans bindings problems ===
They have to do with wrapped lines:
Given these four lines, lines 1, 3 and 4 wrap
line1 One, one, Two, two, Three, (WRAP)
line3 One, one, Two, two, Three, (WRAP)
line4 One, one, Two, two, Three, (WRAP)
BUG: put the cursor on line4, press <End>, press <Up>.
Product Version: NetBeans IDE Dev (Build 20110416-36d9fb69458c)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Forgot to mention. getPosition(Above|Below) only fails if the target line is empty, that is a single '\n'.
Ernie, I'm not sure how soon I'll get to this anyway if you suggest any patch I'll be happy to review it and integrate it.
Not sure when I'll get a chance to looks at this (getting major jVi release, then month in the desert). But if ...; I'd be interested in taking a look around the new view hierarchy.
I also wanted to get the <up> button failure in NB bindings "on paper".
*** This bug has been marked as a duplicate of bug 199987 ***