-
Notifications
You must be signed in to change notification settings - Fork 909
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
set ignoreOverrides false for ipynb and sql files #10499
Conversation
@@ -125,7 +125,7 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape { | |||
// preserve pre 1.38 behaviour to not make group active when preserveFocus: true | |||
// but make sure to restore the editor to fix https://github.com/microsoft/vscode/issues/79633 | |||
activation: options.preserveFocus ? EditorActivation.RESTORE : undefined, | |||
ignoreOverrides: true | |||
ignoreOverrides: uri.fsPath.endsWith('ipynb') || uri.fsPath.endsWith('sql') ? false : true // {{SQL CARBON EDIT}} |
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.
do we need a toLower() here (i.e. a file is *.SQL or *.IPYNB)? Does that scenario work, or do we need a toLower() here?
@@ -125,7 +125,7 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape { | |||
// preserve pre 1.38 behaviour to not make group active when preserveFocus: true | |||
// but make sure to restore the editor to fix https://github.com/microsoft/vscode/issues/79633 | |||
activation: options.preserveFocus ? EditorActivation.RESTORE : undefined, | |||
ignoreOverrides: true | |||
ignoreOverrides: uri.fsPath.toLowerCase().endsWith('ipynb') || uri.fsPath.toLowerCase().endsWith('sql') ? false : true // {{SQL CARBON EDIT}} |
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.
do we know that uri will never be undefined here?
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've been testing this myself. I haven't gotten into this case yet, but we should be defensive about this for uri and probably uri.fsPath as well.
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.
yeah, particularly with the change coming so close to the release. unless, we can see a null check further up the callstack, or uri being referenced unchecked lower in the stack (in which case it will fail anyways)
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.
right, those 2 scenarios don't appear to be 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.
there's no null check for uri, but further up the callstack they're resolving the document uri before calling this:
return documentPromise.then(document => { |
* set ignoreOverrides false for ipynb and sql files * toLowerCase * null checks added
This PR fixes #10490