New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intrinsic bug in getCaretLocation of CompositionTextPainter class #2934

Closed
Myriads opened this Issue Nov 9, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@Myriads

Myriads commented Nov 9, 2014

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;

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Nov 11, 2014

Member

Thanks for looking into it. Do you have an example of how this bug actually manifests itself so that I know it's a real issue that's being fixed?

Member

benfry commented Nov 11, 2014

Thanks for looking into it. Do you have an example of how this bug actually manifests itself so that I know it's a real issue that's being fixed?

@Myriads

This comment has been minimized.

Show comment
Hide comment
@Myriads

Myriads Nov 12, 2014

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.

processingide_13

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:

  • I wrote 2 Korean characters and 1 white space consequently, then the last Korean character was disappeared. Actually the last Korean character was deleted. But at the below line, 2 gray block boxes were still existing(displayed).

Myriads commented Nov 12, 2014

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.

processingide_13

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:

  • I wrote 2 Korean characters and 1 white space consequently, then the last Korean character was disappeared. Actually the last Korean character was deleted. But at the below line, 2 gray block boxes were still existing(displayed).
@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Nov 12, 2014

Member

And this is still the case with 3.0a4? 2.2.1 is half a year old.

Member

benfry commented Nov 12, 2014

And this is still the case with 3.0a4? 2.2.1 is half a year old.

@Myriads

This comment has been minimized.

Show comment
Hide comment
@Myriads

Myriads Nov 12, 2014

IM part of 3.0a4 is almost same with 2.2.1. So this issue and #2935 still exist.

Myriads commented Nov 12, 2014

IM part of 3.0a4 is almost same with 2.2.1. So this issue and #2935 still exist.

@benfry benfry closed this in 5db3030 Nov 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment