(offset int)
| 46 | } |
| 47 | |
| 48 | func (n navigation) ContextDefRange(offset int) hcl.Range { |
| 49 | var block *Block |
| 50 | for _, candidate := range n.root.Blocks { |
| 51 | if candidate.Range().ContainsOffset(offset) { |
| 52 | block = candidate |
| 53 | break |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | if block == nil { |
| 58 | return hcl.Range{} |
| 59 | } |
| 60 | |
| 61 | return block.DefRange() |
| 62 | } |
nothing calls this directly
no test coverage detected