@@ -37,7 +37,6 @@ import { SelectionsOverlay } from 'vs/editor/browser/viewParts/selections/select
37
37
import { ViewCursors } from 'vs/editor/browser/viewParts/viewCursors/viewCursors' ;
38
38
import { ViewZones } from 'vs/editor/browser/viewParts/viewZones/viewZones' ;
39
39
import { Position } from 'vs/editor/common/core/position' ;
40
- import { Range } from 'vs/editor/common/core/range' ;
41
40
import { ScrollType } from 'vs/editor/common/editorCommon' ;
42
41
import { IEditorConfiguration } from 'vs/editor/common/config/editorConfiguration' ;
43
42
import { RenderingContext } from 'vs/editor/browser/view/renderingContext' ;
@@ -502,15 +501,13 @@ export class View extends ViewEventHandler {
502
501
}
503
502
504
503
public layoutContentWidget ( widgetData : IContentWidgetData ) : void {
505
- let newRange = widgetData . position ? widgetData . position . range || null : null ;
506
- if ( newRange === null ) {
507
- const newPosition = widgetData . position ? widgetData . position . position : null ;
508
- if ( newPosition !== null ) {
509
- newRange = new Range ( newPosition . lineNumber , newPosition . column , newPosition . lineNumber , newPosition . column ) ;
510
- }
511
- }
512
- const newPreference = widgetData . position ? widgetData . position . preference : null ;
513
- this . _contentWidgets . setWidgetPosition ( widgetData . widget , newRange , newPreference , widgetData . position ?. positionAffinity ?? null ) ;
504
+ this . _contentWidgets . setWidgetPosition (
505
+ widgetData . widget ,
506
+ widgetData . position ?. position ?? null ,
507
+ widgetData . position ?. secondaryPosition ?? null ,
508
+ widgetData . position ?. preference ?? null ,
509
+ widgetData . position ?. positionAffinity ?? null
510
+ ) ;
514
511
this . _scheduleRender ( ) ;
515
512
}
516
513
0 commit comments