This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 268088

Summary: [REGRESSION] cursor placed in the wrong spot when using a variable width font
Product: editor Reporter: athompson <athompson>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: VERIFIED FIXED    
Severity: normal CC: athompson, puce
Priority: P1 Keywords: REGRESSION
Version: Dev   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: the cursor is actually at the end of the line

Description athompson 2016-09-18 23:15:53 UTC
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.
Comment 1 Jiri Kovalsky 2016-09-19 07:16:34 UTC
Can you please take a look at this issue? Thanks!
Comment 2 Jiri Kovalsky 2016-09-19 07:21:25 UTC
Does this happen in development build only or also in 8.2 Release Candidate?
Comment 3 Miloslav Metelka 2016-09-19 08:33:44 UTC
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.
Comment 4 Miloslav Metelka 2016-09-19 08:58:19 UTC
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.
Comment 5 Miloslav Metelka 2016-09-19 13:45:22 UTC
http://hg.netbeans.org/jet-main/rev/7b1083708cc2
Comment 6 Quality Engineering 2016-09-21 02:00:02 UTC
Integrated into 'main-silver', will be available in build *201609210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7b1083708cc2
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #268088 - [REGRESSION] cursor placed in the wrong spot when using a variable width font.
Comment 7 athompson 2016-09-21 15:29:08 UTC
Yup!
Comment 8 Miloslav Metelka 2016-11-22 14:53:24 UTC
*** Bug 268946 has been marked as a duplicate of this bug. ***
Comment 9 Miloslav Metelka 2016-12-09 22:45:13 UTC
Transplanted into release82 as b36bcf003f7a
Comment 10 Jiri Prox 2016-12-13 12:16:04 UTC
verified in path