@@ -14,8 +14,6 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic
14
14
import { Selection } from 'vs/editor/common/core/selection' ;
15
15
import { EditorOption } from 'vs/editor/common/config/editorOptions' ;
16
16
17
- let isRenderedUsingBorder = true ;
18
-
19
17
export abstract class AbstractLineHighlightOverlay extends DynamicViewOverlay {
20
18
private readonly _context : ViewContext ;
21
19
protected _lineHeight : number ;
@@ -57,17 +55,14 @@ export abstract class AbstractLineHighlightOverlay extends DynamicViewOverlay {
57
55
private _readFromSelections ( ) : boolean {
58
56
let hasChanged = false ;
59
57
60
- // Only render the first selection when using border
61
- const renderSelections = isRenderedUsingBorder ? this . _selections . slice ( 0 , 1 ) : this . _selections ;
62
-
63
- const cursorsLineNumbers = renderSelections . map ( s => s . positionLineNumber ) ;
58
+ const cursorsLineNumbers = this . _selections . map ( s => s . positionLineNumber ) ;
64
59
cursorsLineNumbers . sort ( ( a , b ) => a - b ) ;
65
60
if ( ! arrays . equals ( this . _cursorLineNumbers , cursorsLineNumbers ) ) {
66
61
this . _cursorLineNumbers = cursorsLineNumbers ;
67
62
hasChanged = true ;
68
63
}
69
64
70
- const selectionIsEmpty = renderSelections . every ( s => s . isEmpty ( ) ) ;
65
+ const selectionIsEmpty = this . _selections . every ( s => s . isEmpty ( ) ) ;
71
66
if ( this . _selectionIsEmpty !== selectionIsEmpty ) {
72
67
this . _selectionIsEmpty = selectionIsEmpty ;
73
68
hasChanged = true ;
@@ -203,7 +198,6 @@ export class CurrentLineMarginHighlightOverlay extends AbstractLineHighlightOver
203
198
}
204
199
205
200
registerThemingParticipant ( ( theme , collector ) => {
206
- isRenderedUsingBorder = false ;
207
201
const lineHighlight = theme . getColor ( editorLineHighlight ) ;
208
202
if ( lineHighlight ) {
209
203
collector . addRule ( `.monaco-editor .view-overlays .current-line { background-color: ${ lineHighlight } ; }` ) ;
@@ -212,7 +206,6 @@ registerThemingParticipant((theme, collector) => {
212
206
if ( ! lineHighlight || lineHighlight . isTransparent ( ) || theme . defines ( editorLineHighlightBorder ) ) {
213
207
const lineHighlightBorder = theme . getColor ( editorLineHighlightBorder ) ;
214
208
if ( lineHighlightBorder ) {
215
- isRenderedUsingBorder = true ;
216
209
collector . addRule ( `.monaco-editor .view-overlays .current-line { border: 2px solid ${ lineHighlightBorder } ; }` ) ;
217
210
collector . addRule ( `.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${ lineHighlightBorder } ; }` ) ;
218
211
if ( theme . type === 'hc' ) {
0 commit comments