Undesired ScrollToTop when formatting via CTRL+ALT+L


Hello Rider-JetBrains-Community,

When I use code formatting via CTRL+ALT+L in Rider 2021.1.3 the editor scrolls to the top of the file. This is not happening in CLion, IntelliJ and PyCharm. How can I disable this?

I see the issue was already submitted here - https://youtrack.jetbrains.com/issue/RIDER-29163?_ga=2.254213899.243631186.1627401835-1220018938.1623244660

Is there any update on this?

Kind regards

Comment actions Permalink

Hello James,

The issue linked is marked as fixed already. I tried to reproduce the behavior with currently available Rider 21.1.5 and 21.2 EAP, but have not faced such issue, could you please try updating Rider and let me know how it goes?

Comment actions Permalink

Hello Olga,

Thank you for your fast response.

I just updated to 21.1.5 and the editor still does the ScrollToTop.

I do select all lines via CTRL-A, then use CTRL-ALT-L to format and the editor still scrolls to the top of the file. The error is not happening, when I select only the body of a class. As soon as the class itself, the namespace block and the import's block are selected, the formatting scrolls to the top. In PyCharm, CLion, IntelliJ, DataGrip this is not the case.



Comment actions Permalink

Thank you for the details, I was able to reproduce it and created a corresponding issue on our tracker: RIDER-66338, please watch it for monitoring the progress and accept our apologies for the inconvenience. 

Comment actions Permalink

Btw, you don't actually need to select the whole file to format it in the current file. Without Ctrl-A it should do the same and in this case the cursor should stay on the same place. 


Please sign in to leave a comment.