File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ func hasTestOpt(opts []string) bool {
6666func summarizeDiff (diffs []diffmatchpatch.Diff ) * FileDiff {
6767 var builder strings.Builder
6868 var err error
69- var lastLineBreak bool
69+ var endWithLineBreak bool
7070 var fileDiff FileDiff
7171
7272 writeString := func (builder * strings.Builder , s string ) {
@@ -96,7 +96,7 @@ func summarizeDiff(diffs []diffmatchpatch.Diff) *FileDiff {
9696 fileDiff .numDelete += len (text )
9797 case diffmatchpatch .DiffEqual :
9898 var showHead , showTail bool
99- lastLineBreak = text [len (text )- 1 :] == "\n "
99+ endWithLineBreak = text [len (text )- 1 :] == "\n "
100100 writeLineCount := min (maxShowLine , len (lines ))
101101
102102 if i == 0 {
@@ -127,7 +127,7 @@ func summarizeDiff(diffs []diffmatchpatch.Diff) *FileDiff {
127127 writeString (& builder , omissionText )
128128 }
129129 if showTail {
130- if ! showHead && ! lastLineBreak {
130+ if ! showHead && ! endWithLineBreak {
131131 writeString (& builder , omissionText )
132132 }
133133 writeString (& builder , strings .Join (lines [len (lines )- writeLineCount :], "\n " ))
You can’t perform that action at this time.
0 commit comments