Skip to content

Commit

Permalink
Discard value after END marker
Browse files Browse the repository at this point in the history
  • Loading branch information
Krismix1 authored and jesseduffield committed Jun 5, 2021
1 parent fd38ad8 commit 05a23f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/gui/mergeconflicts/find_conflicts.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func findConflicts(content string) []*mergeConflict {
case END:
newConflict.end = i
conflicts = append(conflicts, newConflict)
// reset value to avoid any possible silent mutations in further iterations
newConflict = nil
default:
// line isn't a merge conflict marker so we just continue
}
Expand Down

0 comments on commit 05a23f0

Please sign in to comment.