mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
enhance: unify selection mode and hunk mode
This commit is contained in:
parent
42f8e41985
commit
9de2853003
7 changed files with 446 additions and 724 deletions
|
@ -69,7 +69,7 @@ namespace SourceGit.Models
|
|||
public string Repo { get; set; } = null;
|
||||
public DiffOption Option { get; set; } = null;
|
||||
|
||||
public TextDiffSelection MakeSelection(int startLine, int endLine, bool isSideBySide, bool isOldSide)
|
||||
public TextDiffSelection MakeSelection(int startLine, int endLine, bool isCombined, bool isOldSide)
|
||||
{
|
||||
var rs = new TextDiffSelection();
|
||||
rs.StartLine = startLine;
|
||||
|
@ -95,7 +95,7 @@ namespace SourceGit.Models
|
|||
var line = Lines[i];
|
||||
if (line.Type == TextDiffLineType.Added)
|
||||
{
|
||||
if (!isSideBySide)
|
||||
if (isCombined)
|
||||
{
|
||||
rs.HasChanges = true;
|
||||
break;
|
||||
|
@ -111,7 +111,7 @@ namespace SourceGit.Models
|
|||
}
|
||||
else if (line.Type == TextDiffLineType.Deleted)
|
||||
{
|
||||
if (!isSideBySide)
|
||||
if (isCombined)
|
||||
{
|
||||
rs.HasChanges = true;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue