File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -64,32 +64,32 @@ public BlockNavigation(object context)
64
64
65
65
var lineIdx = 0 ;
66
66
var blockStartIdx = 0 ;
67
- var isNewBlock = true ;
67
+ var isReadingBlock = false ;
68
68
var blocks = new List < Block > ( ) ;
69
69
70
70
foreach ( var line in lines )
71
71
{
72
72
lineIdx ++ ;
73
73
if ( line . Type is Models . TextDiffLineType . Added or Models . TextDiffLineType . Deleted or Models . TextDiffLineType . None )
74
74
{
75
- if ( isNewBlock )
75
+ if ( ! isReadingBlock )
76
76
{
77
- isNewBlock = false ;
77
+ isReadingBlock = true ;
78
78
blockStartIdx = lineIdx ;
79
79
}
80
80
}
81
81
else
82
82
{
83
- if ( ! isNewBlock )
83
+ if ( isReadingBlock )
84
84
{
85
85
blocks . Add ( new Block ( blockStartIdx , lineIdx - 1 ) ) ;
86
- isNewBlock = true ;
86
+ isReadingBlock = false ;
87
87
}
88
88
}
89
89
}
90
90
91
- if ( ! isNewBlock )
92
- blocks . Add ( new Block ( blockStartIdx , lines . Count - 1 ) ) ;
91
+ if ( isReadingBlock )
92
+ blocks . Add ( new Block ( blockStartIdx , lines . Count ) ) ;
93
93
94
94
Blocks . AddRange ( blocks ) ;
95
95
}
You can’t perform that action at this time.
0 commit comments