[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [nyx/master] Connection details usually not visible



commit f6cbc8d66430028d6ff1050db4499d1e2af90ab6
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Oct 29 21:21:56 2017 -0700

    Connection details usually not visible
    
    The 'width' attribute already takes into account the initial 'x' offset, but in
    the conditional we didn't account for that causing connection details to just
    about never be shown.
---
 nyx/panel/connection.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nyx/panel/connection.py b/nyx/panel/connection.py
index fc586b6..15a2638 100644
--- a/nyx/panel/connection.py
+++ b/nyx/panel/connection.py
@@ -709,7 +709,7 @@ def _draw_line_details(subwindow, x, y, line, width, attr):
     comp = ['%-40s' % (line.fingerprint if line.fingerprint else 'UNKNOWN'), '  ' + (line.nickname if line.nickname else 'UNKNOWN')]
 
   for entry in comp:
-    if width >= x + len(entry):
+    if width >= len(entry):
       x = subwindow.addstr(x, y, entry, *attr)
     else:
       return

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits