Skip to content

Commit

Permalink
Validate code action range before passing it to providers
Browse files Browse the repository at this point in the history
Fixes #80288
  • Loading branch information
mjbvz committed Nov 20, 2019
1 parent b1a02d3 commit 4934a6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vs/editor/contrib/codeAction/codeActionModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ class CodeActionOracle extends Disposable {
return undefined;
}
for (const marker of this._markerService.read({ resource: model.uri })) {
if (Range.intersectRanges(marker, selection)) {
return Range.lift(marker);
const markerRange = model.validateRange(marker);
if (Range.intersectRanges(markerRange, selection)) {
return Range.lift(markerRange);
}
}

Expand Down

0 comments on commit 4934a6f

Please sign in to comment.