When jumping between versions and they have the same amount of lines, restore the same scroll position.
Having an unchanged line count between RegEx versions is very likely b/c often you leave the same input and vary the RegEx over the versions.
Even if the total line amount differs between version, the app should try to restore the line/scroll position.
As long as the just opened version has not less lines than the line scrolled to in the just closed version, this estimation will often be perfect (if the changes in lines after the scroll position) or at least a good approximation if only shifted by a few lines.
Almost any attempt is better than being stubbornly forced to line 1.
Short slideshow: Annotated screenshots of status quo + Mockups of improved version
https://github.com/firasdib/Regex101/assets/737143/f4a35f57-12b5-4fa5-ab07-fbfe21618b28
Feature proposal
When jumping between versions and they have the same amount of lines, restore the same scroll position.
Having an unchanged line count between RegEx versions is very likely b/c often you leave the same input and vary the RegEx over the versions.
Even if the total line amount differs between version, the app should try to restore the line/scroll position.
As long as the just opened version has not less lines than the line scrolled to in the just closed version, this estimation will often be perfect (if the changes in lines after the scroll position) or at least a good approximation if only shifted by a few lines.
Almost any attempt is better than being stubbornly forced to line 1.