File tree 1 file changed +6
-3
lines changed
packages/language_server/src/robotcode/language_server/robotframework/parts
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]:
745
745
library_name = next (
746
746
(e for e in libraries .keys () if library_name_matcher == KeywordMatcher (e )), library_name
747
747
)
748
-
748
+ valid_namespace = False
749
749
if library_name in libraries :
750
+ valid_namespace = True
751
+
750
752
r .start .character = lib_name_index + 1
751
753
for kw in libraries [library_name ].library_doc .keywords .values ():
752
754
if kw .is_error_handler :
@@ -787,6 +789,7 @@ def enumerate_indexes(s: str, c: str) -> Iterator[int]:
787
789
}
788
790
789
791
if resources :
792
+ valid_namespace = True
790
793
r .start .character = lib_name_index + 1
791
794
for res in resources .values ():
792
795
for kw in res .library_doc .keywords .values ():
@@ -819,8 +822,8 @@ def enumerate_indexes(s: str, c: str) -> Iterator[int]:
819
822
),
820
823
)
821
824
)
822
-
823
- return result
825
+ if result and valid_namespace :
826
+ return result
824
827
825
828
if r is None :
826
829
r = Range (position , position )
You can’t perform that action at this time.
0 commit comments