Browse Source

Fixed "list" bug; display shows the current position in the queue

master
Julio Biason 16 years ago
parent
commit
34f0702dc8
  1. 5
      mitterlib/ui/ui_zork.py

5
mitterlib/ui/ui_zork.py

@ -90,13 +90,16 @@ class Interface(cmd.Cmd):
print '("current", "previous" or "next")' print '("current", "previous" or "next")'
return return
print 'Message %d of %d:' % (self._cursor + 1, len(self._messages))
print
message = self._messages[self._cursor] message = self._messages[self._cursor]
console_utils.print_messages(message, self._connection) console_utils.print_messages(message, self._connection)
return return
def do_list(self, line=None): def do_list(self, line=None):
"""Print a summary of the messages in the list.""" """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: if pos == self._cursor:
indicator = '>' indicator = '>'
else: else:

Loading…
Cancel
Save