From dec6a178248fa79bf545021d99dbcb9e62a776aa Mon Sep 17 00:00:00 2001 From: Bob Farrell Date: Sun, 27 Apr 2008 23:43:00 +0100 Subject: [PATCH] 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. --- bpython.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bpython.py b/bpython.py index 85ab09b..4e2ba16 100644 --- a/bpython.py +++ b/bpython.py @@ -362,7 +362,8 @@ class Repl: """Display a list of options on the screen.""" y, x = self.scr.getyx() - + items = [ i.rpartition('.')[-1] for i in items ] + def calc_lsize(r): """Calculate the size required on screen to display the list. Unfortunately Python 2.x doesn't allow assigning to the scope