File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,7 +206,12 @@ export class WorkbenchContextKeysHandler extends Disposable {
206206
207207 if ( activeEditorPane ) {
208208 this . activeEditorContext . set ( activeEditorPane . getId ( ) ) ;
209- this . activeEditorIsReadonly . set ( activeEditorPane . input . isReadonly ( ) ) ;
209+ try {
210+ this . activeEditorIsReadonly . set ( activeEditorPane . input . isReadonly ( ) ) ;
211+ } catch ( error ) {
212+ // TODO@ben for https://github.com/microsoft/vscode/issues/93224
213+ throw new Error ( `${ error . message } : editor id ${ activeEditorPane . getId ( ) } ` ) ;
214+ }
210215 } else {
211216 this . activeEditorContext . reset ( ) ;
212217 this . activeEditorIsReadonly . reset ( ) ;
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ export interface IOpenEditorResult {
2323
2424export class EditorControl extends Disposable {
2525
26- get minimumWidth ( ) { return this . _activeEditorPane ? this . _activeEditorPane . minimumWidth : DEFAULT_EDITOR_MIN_DIMENSIONS . width ; }
27- get minimumHeight ( ) { return this . _activeEditorPane ? this . _activeEditorPane . minimumHeight : DEFAULT_EDITOR_MIN_DIMENSIONS . height ; }
28- get maximumWidth ( ) { return this . _activeEditorPane ? this . _activeEditorPane . maximumWidth : DEFAULT_EDITOR_MAX_DIMENSIONS . width ; }
29- get maximumHeight ( ) { return this . _activeEditorPane ? this . _activeEditorPane . maximumHeight : DEFAULT_EDITOR_MAX_DIMENSIONS . height ; }
26+ get minimumWidth ( ) { return this . _activeEditorPane ?. minimumWidth ?? DEFAULT_EDITOR_MIN_DIMENSIONS . width ; }
27+ get minimumHeight ( ) { return this . _activeEditorPane ?. minimumHeight ?? DEFAULT_EDITOR_MIN_DIMENSIONS . height ; }
28+ get maximumWidth ( ) { return this . _activeEditorPane ?. maximumWidth ?? DEFAULT_EDITOR_MAX_DIMENSIONS . width ; }
29+ get maximumHeight ( ) { return this . _activeEditorPane ?. maximumHeight ?? DEFAULT_EDITOR_MAX_DIMENSIONS . height ; }
3030
3131 private readonly _onDidFocus = this . _register ( new Emitter < void > ( ) ) ;
3232 readonly onDidFocus = this . _onDidFocus . event ;
You can’t perform that action at this time.
0 commit comments