File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/language_server/src/robotcode/language_server/robotframework/parts Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -745,8 +745,10 @@ def enumerate_indexes(s: str, c: str) -> Iterator[int]:
745745 library_name = next (
746746 (e for e in libraries .keys () if library_name_matcher == KeywordMatcher (e )), library_name
747747 )
748-
748+ valid_namespace = False
749749 if library_name in libraries :
750+ valid_namespace = True
751+
750752 r .start .character = lib_name_index + 1
751753 for kw in libraries [library_name ].library_doc .keywords .values ():
752754 if kw .is_error_handler :
@@ -787,6 +789,7 @@ def enumerate_indexes(s: str, c: str) -> Iterator[int]:
787789 }
788790
789791 if resources :
792+ valid_namespace = True
790793 r .start .character = lib_name_index + 1
791794 for res in resources .values ():
792795 for kw in res .library_doc .keywords .values ():
@@ -819,8 +822,8 @@ def enumerate_indexes(s: str, c: str) -> Iterator[int]:
819822 ),
820823 )
821824 )
822-
823- return result
825+ if result and valid_namespace :
826+ return result
824827
825828 if r is None :
826829 r = Range (position , position )
You can’t perform that action at this time.
0 commit comments