Skip to content

Commit

Permalink
Fix error when completing "svd/x" without trailing space
Browse files Browse the repository at this point in the history
  • Loading branch information
jaseg committed Feb 15, 2021
1 parent 38f7904 commit b5ef1c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmdebug/svd_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def complete(self, text, word):
if len(s) > 1:
s = s[1:]
else:
return
return [] # completion after e.g. "svd/x" but before trailing space

if len(s) == 1:
return list(self.svd_file.peripherals.prefix_match_iter(s[0]))
Expand All @@ -371,7 +371,7 @@ def complete(self, text, word):
reg = reg[1:]

if s[0] not in self.svd_file.peripherals:
return
return []

per = self.svd_file.peripherals[s[0]]
return list(per.registers.prefix_match_iter(s[1]))
Expand Down

0 comments on commit b5ef1c8

Please sign in to comment.