Skip to content

Commit 10fba08

Browse files
committed
code_review: PR #949
Signed-off-by: leo <[email protected]>
1 parent 821063e commit 10fba08

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Views/TextDiffView.axaml.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -973,13 +973,9 @@ private void CopyWithoutIndicators()
973973

974974
var startPosition = selection.StartPosition;
975975
var endPosition = selection.EndPosition;
976-
977-
if (startPosition.Line > endPosition.Line
978-
|| startPosition.Line == endPosition.Line && startPosition.Column > endPosition.Column)
979-
{
980-
// swap start and end
976+
977+
if (startPosition.Location > endPosition.Location)
981978
(startPosition, endPosition) = (endPosition, startPosition);
982-
}
983979

984980
var startIdx = Math.Min(startPosition.Line - 1, lines.Count - 1);
985981
var endIdx = Math.Min(endPosition.Line - 1, lines.Count - 1);

0 commit comments

Comments
 (0)