Skip to content

Commit f0d0d1f

Browse files
committed
using instead the equals utility from the arrays.ts file
1 parent 9b68497 commit f0d0d1f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import * as dom from 'vs/base/browser/dom';
77
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
88
import { createTrustedTypesPolicy } from 'vs/base/browser/trustedTypes';
9+
import { equals } from 'vs/base/common/arrays';
910
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
1011
import 'vs/css!./stickyScroll';
1112
import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/browser/editorBrowser';
@@ -23,9 +24,7 @@ export class StickyScrollWidgetState {
2324
) { }
2425

2526
public equals(other: StickyScrollWidgetState | undefined): boolean {
26-
return !!other && this.lastLineRelativePosition === other.lastLineRelativePosition
27-
&& this.lineNumbers.length === other.lineNumbers.length
28-
&& this.lineNumbers.every((lineNumber, index) => lineNumber === other.lineNumbers[index]);
27+
return !!other && this.lastLineRelativePosition === other.lastLineRelativePosition && equals(this.lineNumbers, other.lineNumbers);
2928
}
3029
}
3130

0 commit comments

Comments
 (0)