Skip to content

Commit a07bcaa

Browse files
author
Bob Farrell
committed
Tab completion suggestions no longer have pointless repetition
The suggestions for, e.g. foo.bar. would include "foo.bar." in every suggestion, and it seemed like a pretty pointless waste of space, especially for a curses app. committer: Bob Farrell <bob@keys.(none)>
1 parent 9dfacee commit a07bcaa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎bpython.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ def show_list( self, items, topline=None ):
362362
"""Display a list of options on the screen."""
363363

364364
y, x = self.scr.getyx()
365-
365+
items = [ i.rpartition('.')[-1] for i in items ]
366+
366367
def calc_lsize(r):
367368
"""Calculate the size required on screen to display the list.
368369
Unfortunately Python 2.x doesn't allow assigning to the scope

0 commit comments

Comments
 (0)