On Tue, 1 Sep 2026 19:10:18 GMT, Andy Goryachev <[email protected]> wrote:

>> modules/jfx.incubator.richtext/src/main/java/com/sun/jfx/incubator/scene/control/richtext/RangeInfo.java
>>  line 69:
>> 
>>> 67:         // remove line spacing from the last line to force navigating 
>>> to the next cell
>>> 68:         if (sz > 0) {
>>> 69:             d[sz - 1] -= lineSpacing;
>> 
>> if size of `d` is `2 * sz`, this should be
>> 
>> d[2 * sz - 1] -=...
>> ``` 
>> or `d[d.length - 1]`.
>
> back in the olden days, sz+sz was much faster than sz*2...
> with your permission, I'll leave it as is

Regardless of sz+sz/sz*2, please note that this is still pending:

This is wrong:

d[sz - 1] -= lineSpacing;

and it should be any of:

d[2 * sz - 1] -= ...

or

d[sz + sz - 1] -= ...

or better then:

d[d.length - 1] -= ...

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/2280#discussion_r3908773992

Reply via email to