@@ -14,14 +14,16 @@ import { stripIcons } from 'vs/base/common/iconLabels';
14
14
import { Iterable } from 'vs/base/common/iterator' ;
15
15
import { Disposable , DisposableStore , IReference , MutableDisposable } from 'vs/base/common/lifecycle' ;
16
16
import { ResourceMap } from 'vs/base/common/map' ;
17
+ import { isMacintosh } from 'vs/base/common/platform' ;
18
+ import { ThemeIcon } from 'vs/base/common/themables' ;
17
19
import { Constants } from 'vs/base/common/uint' ;
18
20
import { URI } from 'vs/base/common/uri' ;
19
21
import { generateUuid } from 'vs/base/common/uuid' ;
20
22
import { ContentWidgetPositionPreference , ICodeEditor , IContentWidgetPosition , IEditorMouseEvent , MouseTargetType } from 'vs/editor/browser/editorBrowser' ;
21
23
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService' ;
22
24
import { EditorOption } from 'vs/editor/common/config/editorOptions' ;
23
25
import { overviewRulerError , overviewRulerInfo } from 'vs/editor/common/core/editorColorRegistry' ;
24
- import { IRange , Range } from 'vs/editor/common/core/range' ;
26
+ import { IRange } from 'vs/editor/common/core/range' ;
25
27
import { IEditorContribution } from 'vs/editor/common/editorCommon' ;
26
28
import { IModelDeltaDecoration , ITextModel , OverviewRulerLane , TrackedRangeStickiness } from 'vs/editor/common/model' ;
27
29
import { IModelService } from 'vs/editor/common/services/model' ;
@@ -34,24 +36,22 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
34
36
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView' ;
35
37
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
36
38
import { themeColorFromId } from 'vs/platform/theme/common/themeService' ;
37
- import { ThemeIcon } from 'vs/base/common/themables' ;
38
39
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity' ;
40
+ import { EditorLineNumberContextMenu , GutterActionsRegistry } from 'vs/workbench/contrib/codeEditor/browser/editorLineNumberMenu' ;
39
41
import { getTestItemContextOverlay } from 'vs/workbench/contrib/testing/browser/explorerProjections/testItemContextOverlay' ;
40
42
import { testingRunAllIcon , testingRunIcon , testingStatesToIcons } from 'vs/workbench/contrib/testing/browser/icons' ;
41
- import { DefaultGutterClickAction , getTestingConfiguration , TestingConfigKeys } from 'vs/workbench/contrib/testing/common/configuration' ;
42
- import { labelForTestInState , Testing } from 'vs/workbench/contrib/testing/common/constants' ;
43
+ import { DefaultGutterClickAction , TestingConfigKeys , getTestingConfiguration } from 'vs/workbench/contrib/testing/common/configuration' ;
44
+ import { Testing , labelForTestInState } from 'vs/workbench/contrib/testing/common/constants' ;
43
45
import { TestId } from 'vs/workbench/contrib/testing/common/testId' ;
44
- import { ITestDecoration as IPublicTestDecoration , ITestingDecorationsService , TestDecorations } from 'vs/workbench/contrib/testing/common/testingDecorations' ;
45
- import { ITestingPeekOpener } from 'vs/workbench/contrib/testing/common/testingPeekOpener' ;
46
- import { isFailedState , maxPriority } from 'vs/workbench/contrib/testing/common/testingStates' ;
47
- import { buildTestUri , parseTestUri , TestUriType } from 'vs/workbench/contrib/testing/common/testingUri' ;
48
46
import { ITestProfileService } from 'vs/workbench/contrib/testing/common/testProfileService' ;
49
47
import { LiveTestResult } from 'vs/workbench/contrib/testing/common/testResult' ;
50
48
import { ITestResultService } from 'vs/workbench/contrib/testing/common/testResultService' ;
51
- import { getContextForTestItem , ITestService , testsInFile } from 'vs/workbench/contrib/testing/common/testService' ;
52
- import { IncrementalTestCollectionItem , InternalTestItem , IRichLocation , ITestMessage , ITestRunProfile , TestDiffOpType , TestMessageType , TestResultItem , TestResultState , TestRunProfileBitset } from 'vs/workbench/contrib/testing/common/testTypes' ;
53
- import { EditorLineNumberContextMenu , GutterActionsRegistry } from 'vs/workbench/contrib/codeEditor/browser/editorLineNumberMenu' ;
54
- import { isMacintosh } from 'vs/base/common/platform' ;
49
+ import { ITestService , getContextForTestItem , testsInFile } from 'vs/workbench/contrib/testing/common/testService' ;
50
+ import { IRichLocation , ITestMessage , ITestRunProfile , IncrementalTestCollectionItem , InternalTestItem , TestDiffOpType , TestMessageType , TestResultItem , TestResultState , TestRunProfileBitset } from 'vs/workbench/contrib/testing/common/testTypes' ;
51
+ import { ITestDecoration as IPublicTestDecoration , ITestingDecorationsService , TestDecorations } from 'vs/workbench/contrib/testing/common/testingDecorations' ;
52
+ import { ITestingPeekOpener } from 'vs/workbench/contrib/testing/common/testingPeekOpener' ;
53
+ import { isFailedState , maxPriority } from 'vs/workbench/contrib/testing/common/testingStates' ;
54
+ import { TestUriType , buildTestUri , parseTestUri } from 'vs/workbench/contrib/testing/common/testingUri' ;
55
55
56
56
const MAX_INLINE_MESSAGE_LENGTH = 128 ;
57
57
@@ -423,7 +423,7 @@ export class TestingDecorations extends Disposable implements IEditorContributio
423
423
this . _register ( this . editor . onDidChangeModel ( e => this . attachModel ( e . newModelUrl || undefined ) ) ) ;
424
424
this . _register ( this . editor . onMouseDown ( e => {
425
425
if ( e . target . position && this . currentUri ) {
426
- const modelDecorations = editor . getModel ( ) ?. getDecorationsInRange ( Range . fromPositions ( e . target . position ) ) ?? [ ] ;
426
+ const modelDecorations = editor . getModel ( ) ?. getLineDecorations ( e . target . position . lineNumber ) ?? [ ] ;
427
427
if ( ! modelDecorations . length ) {
428
428
return ;
429
429
}
0 commit comments