Skip to content

Commit

Permalink
Update position lookup for outside of body
Browse files Browse the repository at this point in the history
This is to reflect upstream change hashicorp/hcl#487
  • Loading branch information
radeksimko committed Jan 5, 2022
1 parent b482d40 commit 600b2e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decoder/candidates.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func isPosOutsideBody(block *hclsyntax.Block, pos hcl.Pos) bool {
return true
}

if block.DefRange().ContainsPos(pos) {
if hcl.RangeBetween(block.TypeRange, block.OpenBraceRange).ContainsPos(pos) {
return true
}

Expand Down

0 comments on commit 600b2e5

Please sign in to comment.