File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ def complete_variable(text):
189189 else :
190190 suffix = ''
191191
192- m1 = re .match ("^(.*?)([A-Z0-9][A-Z0-9_]*(\[[0-9A-Z_]+\])?)[.]([A-Za-z0-9_]*)$" , text )
192+ m1 = re .match ("^(.*?)([A-Z0-9][A-Z0-9_]*(\\ [[0-9A-Z_]+\ \ ])?)[.]([A-Za-z0-9_]*)$" , text )
193193 if m1 is not None :
194194 prefix = m1 .group (1 )
195195 mtype = m1 .group (2 )
@@ -204,7 +204,7 @@ def complete_variable(text):
204204 return []
205205
206206 # handle partially open arrays, like 'NAMED_VALUE_FLOAT[A'
207- m1 = re .match ("^(.*?)([A-Z0-9][A-Z0-9_]*(\[[0-9A-Z_]+ ))$" , text )
207+ m1 = re .match ("^(.*?)([A-Z0-9][A-Z0-9_]*(\\ [[0-9A-Z_]* ))$" , text )
208208 if m1 is not None :
209209 prefix = m1 .group (1 )
210210 mtype = m1 .group (2 )
@@ -215,7 +215,7 @@ def complete_variable(text):
215215 if len (ret ):
216216 return ret
217217
218- m2 = re .match ("^(.*?)([A-Z0-9][A-Z0-9_]*(\[[0-9A-Z_]+\])?)$" , text )
218+ m2 = re .match ("^(.*?)([A-Z0-9][A-Z0-9_]*(\\ [[0-9A-Z_]+\ \ ])?)$" , text )
219219 prefix = m2 .group (1 )
220220 mtype = m2 .group (2 )
221221 ret = []
@@ -237,7 +237,7 @@ def complete_messagetype(text):
237237 '''complete a MAVLink message type'''
238238 global rline_mpstate
239239
240- return list (filter (lambda x : x .startswith (text ), rline_mpstate .status .msgs .keys ()))
240+ return list (filter (lambda x : x .startswith (text ) and "[" not in x , rline_mpstate .status .msgs .keys ()))
241241
242242def rule_expand (component , text ):
243243 '''expand one rule component'''
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ def __init__(self):
125125 "set" : ["(SETTING)" ],
126126 "condition" : ["(VARIABLE)" ],
127127 "graph" : ['(VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE)' ],
128- "dump" : ['(VARIABLE )' ],
128+ "dump" : ['(MESSAGETYPE )' ],
129129 "map" : ['(VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE)' ],
130130 "param" : ['download' , 'check' , 'help (PARAMETER)' ],
131131 }
You can’t perform that action at this time.
0 commit comments