mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-03 13:21:56 +02:00
Fix conflict resolution
This commit is contained in:
parent
a0e7604f61
commit
73548fa15f
@ -156,11 +156,9 @@ func (s *State) ContentAfterConflictResolve(path string, selection Selection) (b
|
|||||||
}
|
}
|
||||||
|
|
||||||
func isIndexToDelete(i int, conflict *mergeConflict, selection Selection) bool {
|
func isIndexToDelete(i int, conflict *mergeConflict, selection Selection) bool {
|
||||||
isMarkerLine :=
|
if i < conflict.start || conflict.end < i {
|
||||||
i == conflict.start ||
|
return false
|
||||||
i == conflict.ancestor ||
|
}
|
||||||
i == conflict.target ||
|
|
||||||
i == conflict.end
|
|
||||||
|
|
||||||
var isWantedContent bool
|
var isWantedContent bool
|
||||||
switch selection {
|
switch selection {
|
||||||
@ -175,5 +173,6 @@ func isIndexToDelete(i int, conflict *mergeConflict, selection Selection) bool {
|
|||||||
case BOTTOM:
|
case BOTTOM:
|
||||||
isWantedContent = conflict.target < i && i < conflict.end
|
isWantedContent = conflict.target < i && i < conflict.end
|
||||||
}
|
}
|
||||||
return isMarkerLine || !isWantedContent
|
|
||||||
|
return !isWantedContent
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user