File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
src/vs/workbench/contrib/audioCues/browser Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ interface LineFeatureState {
180
180
181
181
class MarkerLineFeature implements LineFeature {
182
182
public readonly debounceWhileTyping = true ;
183
-
183
+ private _previousLine : number = 0 ;
184
184
constructor (
185
185
public readonly audioCue : AudioCue ,
186
186
private readonly severity : MarkerSeverity ,
@@ -195,16 +195,15 @@ class MarkerLineFeature implements LineFeature {
195
195
) ,
196
196
( ) => /** @description this.markerService.onMarkerChanged */ ( {
197
197
isPresent : ( position ) => {
198
+ const lineChanged = position . lineNumber !== this . _previousLine ;
199
+ this . _previousLine = position . lineNumber ;
198
200
const hasMarker = this . markerService
199
201
. read ( { resource : model . uri } )
200
202
. some (
201
- ( m ) =>
202
- m . severity === this . severity &&
203
- m . startLineNumber <= position . lineNumber &&
204
- position . lineNumber <= m . endLineNumber &&
205
- m . startColumn <= position . column &&
206
- position . column <= m . endColumn
207
- ) ;
203
+ ( m ) => {
204
+ const onLine = m . severity === this . severity && m . startLineNumber <= position . lineNumber && position . lineNumber <= m . endLineNumber ;
205
+ return lineChanged ? onLine : onLine && ( position . lineNumber <= m . endLineNumber && m . startColumn <= position . column ) ;
206
+ } ) ;
208
207
return hasMarker ;
209
208
} ,
210
209
} )
You can’t perform that action at this time.
0 commit comments