eclipse.platform icon indicating copy to clipboard operation
eclipse.platform copied to clipboard

Type overflow in DocumentMerger when scrolling a large file

Open traggerET opened this issue 2 years ago • 2 comments

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

traggerET avatar Aug 24 '23 08:08 traggerET

Looks like you want provide a patch?

iloveeclipse avatar Aug 24 '23 09:08 iloveeclipse

Can you please provide more details for reproducing the issue? Eg The number of lines in the file where you could see the issue happening

SudhindraKKulkarni avatar Oct 04 '23 06:10 SudhindraKKulkarni