Repository navigation
correctly play error audio cue on line / char navigation - #175277
Merged
Merged
Conversation
Megan Rogge (meganrogge)
marked this pull request as draft
February 23, 2023 19:01
endColumn constraint such that error audio cue plays on line navigation
Megan Rogge (meganrogge)
marked this pull request as ready for review
February 23, 2023 20:09
Megan Rogge (meganrogge)
enabled auto-merge (squash)
February 23, 2023 20:10
Logan Ramos (lramos15)
approved these changes
Feb 23, 2023
Comment on lines
+198
to
207
| const lineChanged = position.lineNumber !== this._previousLine; | ||
| this._previousLine = position.lineNumber; | ||
| const hasMarker = this.markerService | ||
| .read({ resource: model.uri }) | ||
| .some( | ||
| (m) => | ||
| m.severity === this.severity && | ||
| m.startLineNumber <= position.lineNumber && | ||
| position.lineNumber <= m.endLineNumber && | ||
| m.startColumn <= position.column && | ||
| position.column <= m.endColumn | ||
| ); | ||
| (m) => { | ||
| const onLine = m.severity === this.severity && m.startLineNumber <= position.lineNumber && position.lineNumber <= m.endLineNumber; | ||
| return lineChanged ? onLine : onLine && (position.lineNumber <= m.endLineNumber && m.startColumn <= position.column); | ||
| }); | ||
| return hasMarker; |
There was a problem hiding this comment.
This change is not good...
isPresent indicates if the line feature is present for the given position.
With this change, the result of isPresent now depends on previous calls of that function.
I suggest to have isPresent and isPresentOnLine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #174857