Skip to content

Commit a92f864

Browse files
committed
fix a problem with completion when no matches remain - thanks Trundle
1 parent 9919725 commit a92f864

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bpython/cli.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,11 @@ def _complete(self, unused_tab=False):
544544
else:
545545
e = False
546546

547-
if (e or not self.completer.matches) and not self.argspec:
548-
self.scr.redrawwin()
549-
return False
547+
if e or not self.completer.matches:
548+
self.matches = []
549+
if not self.argspec:
550+
self.scr.redrawwin()
551+
return False
550552

551553
if not e and self.completer.matches:
552554
# remove duplicates and restore order

0 commit comments

Comments
 (0)