Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 268088 - [REGRESSION] cursor placed in the wrong spot when using a variable width font
[REGRESSION] cursor placed in the wrong spot when using a variable width font
Product: editor
Classification: Unclassified
Component: Painting & Printing
All All
: P1 (vote)
: 8.2
Assigned To: Miloslav Metelka
: 268946 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2016-09-18 23:15 UTC by athompson
Modified: 2016-12-13 12:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

the cursor is actually at the end of the line (16.36 KB, image/png)
2016-09-18 23:15 UTC, athompson

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 6 Quality Engineering 2016-09-21 02:00:02 UTC
Integrated into 'main-silver', will be available in build *201609210002* on (upload may still be in progress)

User: Miloslav Metelka <>
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
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

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo