From c2b4ccdc7791e399f22442e93cf974983b72b8f3 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Mon, 12 Mar 2012 20:05:40 +0100 Subject: [PATCH] Fixed info sometimes shortening the ID even when there's enough space. --- deluge/ui/console/commands/info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/ui/console/commands/info.py b/deluge/ui/console/commands/info.py index 1787425ad..e611d7ee3 100644 --- a/deluge/ui/console/commands/info.py +++ b/deluge/ui/console/commands/info.py @@ -338,7 +338,7 @@ class Command(BaseCommand): #Shorten the ID if it's necessary. Pretty hacky #I _REALLY_ should make a nice function for it that can partition and shorten stuff space_left = cols - strwidth("[s] 100.00% " + status["name"] + " "*3) - 2 - if space_left >= len(torrent_id): + if space_left >= len(torrent_id) - 2: #There's enough space, print it s += " {!cyan!}%s" % torrent_id else: