From 34f0702dc877948c943215481290f8e2fdafa6d3 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 13 Apr 2009 16:41:55 +1000 Subject: [PATCH] Fixed "list" bug; display shows the current position in the queue --- mitterlib/ui/ui_zork.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mitterlib/ui/ui_zork.py b/mitterlib/ui/ui_zork.py index 1c78132..0d447ee 100644 --- a/mitterlib/ui/ui_zork.py +++ b/mitterlib/ui/ui_zork.py @@ -90,13 +90,16 @@ class Interface(cmd.Cmd): print '("current", "previous" or "next")' return + print 'Message %d of %d:' % (self._cursor + 1, len(self._messages)) + print + message = self._messages[self._cursor] console_utils.print_messages(message, self._connection) return def do_list(self, line=None): """Print a summary of the messages in the list.""" - for pos in xrand(len(self._message)): + for pos in xrange(len(self._messages)): if pos == self._cursor: indicator = '>' else: