mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
refactor: implementation of synchronous scrolling in side-by-side diff view
This commit is contained in:
parent
32e685622b
commit
d9911b3447
2 changed files with 14 additions and 30 deletions
|
@ -388,11 +388,11 @@ namespace SourceGit.Models
|
|||
}
|
||||
|
||||
[GeneratedRegex(@"^@@ \-(\d+),?\d* \+(\d+),?\d* @@")]
|
||||
private static partial Regex indicatorRegex();
|
||||
private static partial Regex REG_INDICATOR();
|
||||
|
||||
private bool ProcessIndicatorForPatch(StringBuilder builder, TextDiffLine indicator, int idx, int start, int end, int ignoreRemoves, int ignoreAdds, bool revert, bool tailed)
|
||||
{
|
||||
var match = indicatorRegex().Match(indicator.Content);
|
||||
var match = REG_INDICATOR().Match(indicator.Content);
|
||||
var oldStart = int.Parse(match.Groups[1].Value);
|
||||
var newStart = int.Parse(match.Groups[2].Value) + ignoreRemoves - ignoreAdds;
|
||||
var oldCount = 0;
|
||||
|
@ -461,7 +461,7 @@ namespace SourceGit.Models
|
|||
|
||||
private bool ProcessIndicatorForPatchSingleSide(StringBuilder builder, TextDiffLine indicator, int idx, int start, int end, int ignoreRemoves, int ignoreAdds, bool revert, bool isOldSide, bool tailed)
|
||||
{
|
||||
var match = indicatorRegex().Match(indicator.Content);
|
||||
var match = REG_INDICATOR().Match(indicator.Content);
|
||||
var oldStart = int.Parse(match.Groups[1].Value);
|
||||
var newStart = int.Parse(match.Groups[2].Value) + ignoreRemoves - ignoreAdds;
|
||||
var oldCount = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue