mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00: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:
parent
7f056a705e
commit
feff7c8a7e
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue