mirror of
https://github.com/felixangell/phi.git
synced 2024-08-16 19:20:21 +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
|
||||
fmt.sh
|
||||
|
||||
|
@ -786,7 +786,7 @@ func (b *Buffer) renderAt(ctx *strife.Renderer, rx int, ry int) {
|
||||
if strings.Compare(string(a), subject) == 0 {
|
||||
for i := 0; i < len(subject); i++ {
|
||||
if _, ok := matches[i+idx]; ok {
|
||||
continue
|
||||
break
|
||||
}
|
||||
matches[i+idx] = colours[syntaxIndex]
|
||||
}
|
||||
|
@ -48,7 +48,10 @@ func CloseBuffer(b *Buffer) bool {
|
||||
i = i + 1
|
||||
lastBuffer = p.(*Buffer)
|
||||
}
|
||||
lastBuffer.HasFocus = true
|
||||
|
||||
if lastBuffer != nil {
|
||||
lastBuffer.HasFocus = true
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user