eclipse-platform / eclipse-platform/eclipse.platform
Type overflow in DocumentMerger when scrolling a large file
Open
bug
- Dominant language
- Java
- Stars
- 165
- Forks
- 174
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 22
Description
When file is quite large, and scrolling is needed, org.eclipse.compare.internal.merge.DocumentMerger.realToVirtualPosition(char, int) method can have type overflow when multiplying (see 1022 line). This gives sometimes negative number and results in wrong scrolling position for example.
In similar method virtualToRealPosition this doesnot seem to be a problem since multiplication of numbers happen after division and overflow is unlikely to happen, so may be similar approach should be used to realToVirtualPosition function
Contributor guide
Assessment
This issue has not been assessed yet.