New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option for preview navigation behavior #112389
Conversation
| 'workbench.editor.enablePreviewFromCodeNavigation': { | ||
| 'type': 'boolean', | ||
| 'description': nls.localize('enablePreviewFromCodeNavigation', "Controls whether preview editors should be kept open as regular editors when opening a second editor from the preview (e.g. via go to definition)"), | ||
| 'default': true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'default': true | |
| 'default': false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? In my implementation true means new behavior (keeping old preview editor open). Your suggestion would make the old behavior default again. I can also change it to false means new behavior, if that's what you mean.
| @@ -75,7 +77,9 @@ export class CodeEditorService extends CodeEditorServiceImpl { | |||
| // should be pinned or not. This ensures that the source of a navigation | |||
| // is not being replaced by the target. An example is "Goto definition" | |||
| // that otherwise would replace the editor everytime the user navigates. | |||
| const pinPreview = this.configurationService.getValue<boolean>('workbench.editor.enablePreviewFromCodeNavigation'); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if we would lookup this setting similar to how we do it here:
vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts
Line 33 in 4031280
| const editorConfig = this.configurationService.getValue<IWorkbenchEditorConfiguration>().workbench.editor; |
Aka add it to IWorkbenchEditorConfiguration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it, thanks for the pointer
|
@bpasero, would you please help me with the macOS Integration Tests? I'm not sure why it fails all of a sudden, I don't think I changed anything that could cause a timeout... is there a way to restart it? |
|
Thanks |
* add option for preview navigation behavior microsoft#112348 * fix test to comply with changes for microsoft#112348 * fix test to comply with changes for microsoft#112348 * get pinPreview using IWorkbenchEditorConfiguration * adjust for changes Co-authored-by: Benjamin Pasero <benjpas@microsoft.com>

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

This PR fixes #112348
Let me know whether the description text of the new option is ok, so I can fix it if necessary.