mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Fix panic in merge conflict
This commit is contained in:
parent
2eeff1257b
commit
0af0e66586
|
|
@ -30,10 +30,14 @@ func findConflicts(content string) []*mergeConflict {
|
|||
case START:
|
||||
newConflict = &mergeConflict{start: i}
|
||||
case MIDDLE:
|
||||
newConflict.middle = i
|
||||
if newConflict != nil {
|
||||
newConflict.middle = i
|
||||
}
|
||||
case END:
|
||||
newConflict.end = i
|
||||
conflicts = append(conflicts, newConflict)
|
||||
if newConflict != nil {
|
||||
newConflict.end = i
|
||||
conflicts = append(conflicts, newConflict)
|
||||
}
|
||||
// reset value to avoid any possible silent mutations in further iterations
|
||||
newConflict = nil
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue