Caret positioning when going back after a jump to definition
When I go to the previous caret position in CLion (using alt+left arrow or back button on my mouse) it will scroll so that the caret is barely on the screen. Can I configure it so that it restores the previous location of the caret relative to the screen as well? For example, if the caret is in the middle of the screen and I ctrl click a definition that takes me to the top of the file, when I go back it will scroll so that the line the caret was at is the last visible line on the screen. Can I make it scroll so that that line is in the middle of the screen (where it was previously) instead?
Please sign in to leave a comment.
Hello!
So far, I haven't managed to reproduce the issue in CLion 2026.2.1 on my side. When I use the Navigate | Back action, it restores the same scroll offset it had before navigating to a declaration/definition: