Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Visual Studio 2019 how to ensure tab stays open after Go-To-Definition

In Visual Studio, if I Go-To-Definition on e.g. a class by Ctrl+Click or F12, the class is opened in a new tab but the tab is not part of the open tabs (not sure if that is the correct wording). The tab heading is to the right. The tab heading has a little button "Keep Tab Open Ctrl+Alt+Home".

If I make no edits in the opened tab and navigate back using Ctrl-Minus, the new tab is closed.

What do I need to do to always have Go-To-Definition windows open and never close e.g. when navigate away?

Here some pictures @hellip;

This is the start situation:

start

This is the actual situation after Ctrl+Click on Class1:

actual

This is what I expect:

expected

like image 859
buknebelmo Avatar asked Dec 13 '25 09:12

buknebelmo


1 Answers

Tools -> Options -> Environment -> Tabs And Windows
Uncheck "Allow new files to be opened in the preview tab"

You may need to restart Visual Studio for the setting to take effect.

like image 129
Chris Ellis Avatar answered Dec 16 '25 22:12

Chris Ellis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!