Skip to content

Commit

Permalink
Fix microsoft#17346. Clear reference decorations when switching models.
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Dec 22, 2016
1 parent 651c27d commit fbbcb3f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ class DecorationsManager implements IDisposable {
}

private _onModelChanged(): void {

this.removeDecorations();
this._callOnModelChange = dispose(this._callOnModelChange);

var model = this.editor.getModel();
Expand Down Expand Up @@ -733,6 +731,7 @@ export class ReferenceWidget extends PeekViewWidget {
const model = ref.object;
if (model) {
this._previewModelReference = ref;
this._decorationsManager.removeDecorations();
this._preview.setModel(model.textEditorModel);
var sel = Range.lift(reference.range).collapseToStart();
this._preview.setSelection(sel);
Expand Down

0 comments on commit fbbcb3f

Please sign in to comment.