renderScopelights renders a highlight background color for regions in the Scopelights list.
(stln, edln int)
| 280 | // renderScopelights renders a highlight background color for regions |
| 281 | // in the Scopelights list. |
| 282 | func (ed *Editor) renderScopelights(stln, edln int) { |
| 283 | for _, reg := range ed.scopelights { |
| 284 | reg := ed.Buffer.AdjustRegion(reg) |
| 285 | if reg.IsNil() || (stln >= 0 && (reg.Start.Ln > edln || reg.End.Ln < stln)) { |
| 286 | continue |
| 287 | } |
| 288 | ed.renderRegionBox(reg, ed.HighlightColor) |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | // renderRegionBox renders a region in background according to given background |
| 293 | func (ed *Editor) renderRegionBox(reg text.Region, bg image.Image) { |
no test coverage detected