File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Rubberduck.Parsing/Symbols
RubberduckTests/QuickFixes Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,14 @@ private IEnumerable<IAnnotation> FindAnnotations(int line)
118
118
// VBE 1-based indexing
119
119
for ( var i = line - 1 ; i >= 1 ; i -- )
120
120
{
121
- var annotation = _annotations . SingleOrDefault ( a => a . QualifiedSelection . Selection . StartLine == i ) ;
121
+ var lineAnnotations = _annotations . Where ( a => a . QualifiedSelection . Selection . StartLine == i ) ;
122
122
123
- if ( annotation == null )
123
+ if ( ! lineAnnotations . Any ( ) )
124
124
{
125
125
break ;
126
126
}
127
127
128
- annotations . Add ( annotation ) ;
129
-
128
+ annotations . AddRange ( lineAnnotations ) ;
130
129
}
131
130
132
131
return annotations ;
Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ Public Sub Foo
93
93
}
94
94
}
95
95
96
- [ Ignore ( "Unexpected parse error" ) ]
97
96
[ Test ]
98
97
[ Category ( "QuickFixes" ) ]
99
98
public void RemoveDuplicatedAnnotation_QuickFixWorks_RemoveDuplicateFromSameAnnotationList ( )
@@ -104,7 +103,7 @@ Public Sub Foo
104
103
End Sub" ;
105
104
106
105
const string expectedCode = @"
107
- ' @Obsolete
106
+ '@Obsolete
108
107
Public Sub Foo
109
108
End Sub" ;
110
109
@@ -119,7 +118,6 @@ Public Sub Foo
119
118
}
120
119
}
121
120
122
- [ Ignore ( "Unexpected parse error" ) ]
123
121
[ Test ]
124
122
[ Category ( "QuickFixes" ) ]
125
123
public void RemoveDuplicatedAnnotation_QuickFixWorks_RemoveMultipleDuplicatesFromSameAnnotationList ( )
@@ -130,7 +128,7 @@ Public Sub Foo
130
128
End Sub" ;
131
129
132
130
const string expectedCode = @"
133
- ' @Obsolete
131
+ '@Obsolete
134
132
Public Sub Foo
135
133
End Sub" ;
136
134
@@ -145,7 +143,6 @@ Public Sub Foo
145
143
}
146
144
}
147
145
148
- [ Ignore ( "Unexpected parse error" ) ]
149
146
[ Test ]
150
147
[ Category ( "QuickFixes" ) ]
151
148
public void RemoveDuplicatedAnnotation_QuickFixWorks_RemoveDuplicateFromOtherAnnotationList ( )
@@ -173,7 +170,6 @@ Public Sub Foo
173
170
}
174
171
}
175
172
176
- [ Ignore ( "Unexpected parse error" ) ]
177
173
[ Test ]
178
174
[ Category ( "QuickFixes" ) ]
179
175
public void RemoveDuplicatedAnnotation_QuickFixWorks_RemoveMultipleDuplicatesFromOtherAnnotationList ( )
You can’t perform that action at this time.
0 commit comments