In the present TXS version, whenever a file is built the viewer jumps to the cursor position of the current text being edited, which is correct. However, if the same file is edited and rebuilt, the scroll position of the new pdf is set to a new position, even if the user is editing the same paragraph under focus in the viewer.
This feature would add to the viewer the ability to remain at the previous relative position, in cases where there'is no need to scroll the pdf.
Anonymous
This is especially irritating when working on text near the bottom or top of a page. Not scrolling to another location when changed text is already visible helps to make 'compile and check' less annoying :)
PS: My TXS version is 2.6.4.
LBNL: Many thanks for such a great IDE !! You guys are doing a wonderful job.
Last edit: ugh_bough 2013-10-31
Hi mate,there's also an open discussion about this subject here:
https://sourceforge.net/p/texstudio/discussion/907840/thread/bd5243aa/
Cheers.
Hi. Here's the patch for the last version (2.8.1 (hg 4632+:29076db592d3+))
Take a look.
Thank you very much for the patch. After a quick test, it seems to work correctly. However, I would still like to check the logic. Additionally, there are some stylistic issues that should be fixed before we integrate it.
I will come back to this (probably not before in two weeks).
Glad I can help.
Some comments about the patch:
https://sourceforge.net/p/texstudio/discussion/907840/thread/bd5243aa/c69f/attachment/readme
hg 4653 (6e555222431e) implements a more general approach: Only scroll the PDF if syncing points to a region that is not visible. As a side effect this solves the above issue.
Eduardo, in the end I did not use any code from your patch because the gerneral solution is even simpler. Nevertheless, thank you very much for contributing. I probably wouldn't have looked into this without your initiative.
Hi Tim. I've tested your commit, and confirm the issue has been resolved.
Glad I could help anyway.
Thanks for the superb support.