mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
fix<Diff>: fix compile error on .NET 4.8
This commit is contained in:
parent
ef8488de51
commit
44873cf088
1 changed files with 9 additions and 0 deletions
|
@ -24,12 +24,21 @@ namespace SourceGit.Commands {
|
|||
var chunks = new List<string>();
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
#if NET48
|
||||
var ch = text.Substring(i, 1);
|
||||
if (WORD_SEPS.Contains(ch)) {
|
||||
if (start != i) chunks.Add(text.Substring(start, i - start));
|
||||
chunks.Add(ch);
|
||||
start = i + 1;
|
||||
}
|
||||
#else
|
||||
var ch = text[i];
|
||||
if (WORD_SEPS.Contains(ch)) {
|
||||
if (start != i) chunks.Add(text.Substring(start, i - start));
|
||||
chunks.Add(text.Substring(i, 1));
|
||||
start = i + 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (start < size) chunks.Add(text.Substring(start));
|
||||
|
|
Loading…
Reference in a new issue