Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Intrinsic bug in getCaretLocation of CompositionTextPainter class #2934
To get the screen Y offset, the following equation is used.
loc.y = lineIndex * fm.getHeight() + offsetY;
But the linIndex is not the screen Y line number, it is the source line number. To get the screen Y offset, the actual source line number of the first screen line should be subtracted from the current source line number. So it should be changed to the following:
loc.y = (lineIndex - textArea.getFirstLine()) * fm.getHeight() + offsetY;
When the complex character is inputted, then a gray block box will be appeared at the below couple of lines from the current input line. I believe that this problem would be caused by this issue.
Please reopen the issue of "Input Method to compose complex characters" - #2935
These problems reported in #2935 are occurring in the Edit window of Processing. In the above attached picture: