diff --git a/deluge/ui/console/modes/alltorrents.py b/deluge/ui/console/modes/alltorrents.py index 98ac48e3f..1ce09e67e 100644 --- a/deluge/ui/console/modes/alltorrents.py +++ b/deluge/ui/console/modes/alltorrents.py @@ -503,6 +503,7 @@ class AllTorrents(BaseMode): attr = None if lines: tidx = lines.pop()+1 + currow = tidx-self.curoff+2 if tidx in self.marked: bg = "blue" @@ -532,9 +533,6 @@ class AllTorrents(BaseMode): else: colorstr = "{!%s,%s!}"%(fg,bg) - if lines: - currow = tidx-self.curoff+2 - self.add_string(currow,"%s%s"%(colorstr,row[0])) tidx += 1 currow += 1 @@ -636,11 +634,14 @@ class AllTorrents(BaseMode): self.updater.set_torrent_to_update(cid,self._status_keys) elif chr(c) == 'm': self._mark_unmark(self.cursel) + effected_lines = [self.cursel-1] elif chr(c) == 'M': if self.last_mark >= 0: self.marked.extend(range(self.last_mark,self.cursel+1)) + effected_lines = range(self.last_mark,self.cursel) else: self._mark_unmark(self.cursel) + effected_lines = [self.cursel-1] elif chr(c) == 'c': self.marked = [] self.last_mark = -1 diff --git a/deluge/ui/console/modes/torrentdetail.py b/deluge/ui/console/modes/torrentdetail.py index a39c4ea24..d6d93ac21 100644 --- a/deluge/ui/console/modes/torrentdetail.py +++ b/deluge/ui/console/modes/torrentdetail.py @@ -96,6 +96,8 @@ class TorrentDetail(BaseMode, component.Component): self.column_string = "" + self.marked = {} + BaseMode.__init__(self, stdscr, encoding) component.Component.__init__(self, "TorrentDetail", 1, depend=["SessionProxy"])