mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
code_style: use ?:
operator instead of if ... else
statement
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
68e96f428e
commit
11af5d9b29
1 changed files with 1 additions and 5 deletions
|
@ -1049,11 +1049,7 @@ namespace SourceGit.Views
|
|||
// For the last line (selection range is within original source)
|
||||
if (i == endIdx)
|
||||
{
|
||||
if (endPosition.Column < line.Content.Length)
|
||||
builder.Append(line.Content.Substring(0, endPosition.Column - 1));
|
||||
else
|
||||
builder.Append(line.Content);
|
||||
|
||||
builder.Append(endPosition.Column - 1 < line.Content.Length ? line.Content.Substring(0, endPosition.Column - 1) : line.Content);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue