mirror of
https://github.com/Hopiu/micro.git
synced 2026-05-28 16:08:15 +00:00
Fix larger multiline region highlighting
This commit is contained in:
parent
f637268fa7
commit
2a4abbee24
1 changed files with 4 additions and 0 deletions
|
|
@ -73,6 +73,10 @@ func FindAllIndex(regex *regexp.Regexp, str []byte, canMatchStart, canMatchEnd b
|
||||||
func (h *Highlighter) highlightRegion(start int, canMatchEnd bool, lineNum int, line []byte, region *Region) LineMatch {
|
func (h *Highlighter) highlightRegion(start int, canMatchEnd bool, lineNum int, line []byte, region *Region) LineMatch {
|
||||||
highlights := make(LineMatch)
|
highlights := make(LineMatch)
|
||||||
|
|
||||||
|
if start == 0 {
|
||||||
|
highlights[0] = region.group
|
||||||
|
}
|
||||||
|
|
||||||
loc := FindIndex(region.end, line, start == 0, canMatchEnd)
|
loc := FindIndex(region.end, line, start == 0, canMatchEnd)
|
||||||
if loc != nil {
|
if loc != nil {
|
||||||
if region.parent == nil {
|
if region.parent == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue