Adopt optional chaining

This commit is contained in:
Daniel Imms
2019-11-05 11:09:47 -08:00
parent 267fbc7f5e
commit 843d5ff53c
4 changed files with 27 additions and 71 deletions
+1 -3
View File
@@ -688,9 +688,7 @@ export class SelectionService implements ISelectionService {
// reverseIndex) and delete in a splice is only ever used when the same
// number of elements was just added. Given this is could actually be
// beneficial to leave the selection as is for these cases.
if (this._trimListener) {
this._trimListener.dispose();
}
this._trimListener.dispose();
this._trimListener = e.activeBuffer.lines.onTrim(amount => this._onTrim(amount));
}