Created attachment 162103 [details]
the cursor is actually at the end of the line
The issue occurs when the font changes while typing due to syntax highlighting (for example, it becomes bold). Since the cursor position isn't updated it appears the cursor is in the wrong spot. See the attached screenshot.
An issue describing the problem I am describing here was filed by me many years ago (probably at least 10 years at this point). The issue was fixed, but I remember having to reopen that issue at least once (and if not mistaken twice) over the intervening years. The problem seems to keep coming back. I don't feel like tracking down and reopening that old issue anymore so I'll create this new one instead.
Can you please take a look at this issue? Thanks!
Does this happen in development build only or also in 8.2 Release Candidate?
What is the font with which you can reproduce?
I've tested with Arial and the problem does not happen on my machine.
Could you attach your messages.log? Thanks.
Could you test the issue with Arial font if it happens too or not? Thanks.
I was able to reproduce. It's necessary to type e.g. a space at EOL in order to get non-bold identifier which the semantics analysis then change to bold text. I'll fix ASAP.
Integrated into 'main-silver', will be available in build *201609210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Miloslav Metelka <email@example.com>
Log: #268088 - [REGRESSION] cursor placed in the wrong spot when using a variable width font.
*** Bug 268946 has been marked as a duplicate of this bug. ***
Transplanted into release82 as b36bcf003f7a
verified in path