mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
parent
821063e3ec
commit
10fba08e43
1 changed files with 2 additions and 6 deletions
|
@ -974,12 +974,8 @@ namespace SourceGit.Views
|
|||
var startPosition = selection.StartPosition;
|
||||
var endPosition = selection.EndPosition;
|
||||
|
||||
if (startPosition.Line > endPosition.Line
|
||||
|| startPosition.Line == endPosition.Line && startPosition.Column > endPosition.Column)
|
||||
{
|
||||
// swap start and end
|
||||
if (startPosition.Location > endPosition.Location)
|
||||
(startPosition, endPosition) = (endPosition, startPosition);
|
||||
}
|
||||
|
||||
var startIdx = Math.Min(startPosition.Line - 1, lines.Count - 1);
|
||||
var endIdx = Math.Min(endPosition.Line - 1, lines.Count - 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue