File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -158,15 +158,15 @@ export default class MapParser {
158158 if ( declFunc && declFunc . name === currentFunc . name ) {
159159 // Same function - local takes precedence
160160 const distance = targetLine - decl . line ;
161- if ( distance < closestDistance ) {
161+ if ( distance <= closestDistance ) {
162162 closestDistance = distance ;
163163 closestDecl = decl ;
164164 }
165165 } else if ( ! declFunc && decl . scope . toLowerCase ( ) === 'global' ) {
166166 // Global declaration, but only use if no local found
167167 if ( closestDecl === null || closestDecl . scope . toLowerCase ( ) !== 'local' ) {
168168 const distance = targetLine - decl . line ;
169- if ( distance < closestDistance ) {
169+ if ( distance <= closestDistance ) {
170170 closestDistance = distance ;
171171 closestDecl = decl ;
172172 }
@@ -212,7 +212,9 @@ export default class MapParser {
212212 }
213213
214214 const directKeys = Array . from ( validKeys ) ;
215- const functionKeys = includeFunctionKeys ? this . getKeysFromFunctionCalls ( mapName , targetLine ) : [ ] ;
215+ const functionKeys = includeFunctionKeys
216+ ? this . getKeysFromFunctionCalls ( mapName , targetLine )
217+ : [ ] ;
216218
217219 return { directKeys, functionKeys } ;
218220 }
You can’t perform that action at this time.
0 commit comments