mirror of
https://github.com/felixangell/phi.git
synced 2024-09-11 15:55:25 +03:00
fixed seg fault, try not to match conflicts
This commit is contained in:
parent
112cdc74d6
commit
0ac9aff112
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
glew.h
|
tests/
|
||||||
phi-editor
|
phi-editor
|
||||||
fmt.sh
|
fmt.sh
|
||||||
|
|
||||||
|
@ -786,7 +786,7 @@ func (b *Buffer) renderAt(ctx *strife.Renderer, rx int, ry int) {
|
|||||||
if strings.Compare(string(a), subject) == 0 {
|
if strings.Compare(string(a), subject) == 0 {
|
||||||
for i := 0; i < len(subject); i++ {
|
for i := 0; i < len(subject); i++ {
|
||||||
if _, ok := matches[i+idx]; ok {
|
if _, ok := matches[i+idx]; ok {
|
||||||
continue
|
break
|
||||||
}
|
}
|
||||||
matches[i+idx] = colours[syntaxIndex]
|
matches[i+idx] = colours[syntaxIndex]
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,10 @@ func CloseBuffer(b *Buffer) bool {
|
|||||||
i = i + 1
|
i = i + 1
|
||||||
lastBuffer = p.(*Buffer)
|
lastBuffer = p.(*Buffer)
|
||||||
}
|
}
|
||||||
lastBuffer.HasFocus = true
|
|
||||||
|
if lastBuffer != nil {
|
||||||
|
lastBuffer.HasFocus = true
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user