Skip to content

Commit f947fab

Browse files
authored
editors - clarify view state resource (microsoft#155136)
1 parent e0a65a9 commit f947fab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/vs/workbench/browser/parts/editor/editorWithViewState.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ export abstract class AbstractEditorWithViewState<T extends object> extends Edit
208208
*
209209
* @param resource the expected `URI` for the view state. This
210210
* should be used as a way to ensure the view state in the
211-
* editor control is matching the resource expected.
211+
* editor control is matching the resource expected, for example
212+
* by comparing with the underlying model (this was a fix for
213+
* https://github.com/microsoft/vscode/issues/40114).
212214
*/
213215
protected abstract computeEditorViewState(resource: URI): T | undefined;
214216

src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ export class MergeEditor extends AbstractTextEditor<IMergeEditorViewState> {
452452

453453
protected computeEditorViewState(resource: URI): IMergeEditorViewState | undefined {
454454
if (!isEqual(this.model?.result.uri, resource)) {
455-
// TODO@bpasero Why not check `input#resource` and don't ask me for "forgein" resources?
456455
return undefined;
457456
}
458457
const result = this.inputResultView.editor.saveViewState();

0 commit comments

Comments
 (0)