Losing position when resizing script window

Hello everybody,

So I am writing my thesis using R markdown and I constantly need to resize the different panes (Terminal, Environment, Files) as I edit my main Rmd file in the script editor window. Whenever I resize the script editor window I lose the my current position within the document and have to scroll up or down to get back to where I was. This is pretty annoying especially since I am writing a lot of prose.

Is there any way to prevent this from happening? Thanks

Hi @axme100!

I agree that the Source pane could handle this more gracefully! It looks like there's actually an open issue for this problem on the Github tracker:

(Was that you who posted it? if not, you can help contribute by voting with a reaction emoji to let the IDE team know that this affects you, too)

In the meantime, here's a workaround I use:

  • Make sure I leave my cursor at the point where I was working before I resize any panes
  • Make sure I don't click into any other pane while I'm resizing
  • After I'm done resizing the panes, hit the left arrow () or right arrow () key once. This should cause the Source pane to autoscroll back to where your cursor just moved, which should be only one character position off from where you left it.

I also turn on "Highlight selected line" in the code display options, so it's a little easier to visually find my place when that autoscroll happens:

1 Like

Thanks for your response

The work-around you mentioned works great for me, and having the option "highlight selected line" activated makes it easier to work through R studio.

I have added emojis to issues page on Github.

1 Like

Glad to hear it :grin:. Good luck with the thesis! :books:

If you feel that your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.