mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
debug: fix closeReadonlyTabsOnEnd not working (#203500)
The input itself is not readonly, the filesystem is, so this check was always failing. The entire `debug` scheme is readonly, so we don't need to try to replace the check with anything else. This is pretty safe since this code path is only hit when the new setting is enabled. Closes #197949
This commit is contained in:
@@ -710,10 +710,7 @@ export class DebugService implements IDebugService {
|
||||
|
||||
if (this.configurationService.getValue<IDebugConfiguration>('debug').closeReadonlyTabsOnEnd) {
|
||||
const editorsToClose = this.editorService.getEditors(EditorsOrder.SEQUENTIAL).filter(({ editor }) => {
|
||||
if (editor.resource?.scheme === DEBUG_SCHEME) {
|
||||
return editor.isReadonly() && session.getId() === Source.getEncodedDebugData(editor.resource).sessionId;
|
||||
}
|
||||
return false;
|
||||
return editor.resource?.scheme === DEBUG_SCHEME && session.getId() === Source.getEncodedDebugData(editor.resource).sessionId;
|
||||
});
|
||||
this.editorService.closeEditors(editorsToClose);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user