1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-24 05:36:19 +02:00

Fix conflict resolution

This commit is contained in:
Ryooooooga 2021-08-22 01:03:15 +09:00 committed by Jesse Duffield
parent a0e7604f61
commit 73548fa15f

View File

@ -156,11 +156,9 @@ func (s *State) ContentAfterConflictResolve(path string, selection Selection) (b
}
func isIndexToDelete(i int, conflict *mergeConflict, selection Selection) bool {
isMarkerLine :=
i == conflict.start ||
i == conflict.ancestor ||
i == conflict.target ||
i == conflict.end
if i < conflict.start || conflict.end < i {
return false
}
var isWantedContent bool
switch selection {
@ -175,5 +173,6 @@ func isIndexToDelete(i int, conflict *mergeConflict, selection Selection) bool {
case BOTTOM:
isWantedContent = conflict.target < i && i < conflict.end
}
return isMarkerLine || !isWantedContent
return !isWantedContent
}