[tor-commits] [nyx/master] Interpreter scrolling off by one

atagar at torproject.org atagar at torproject.org
Tue Oct 17 18:51:21 UTC 2017


commit 85591ab9591a92c1e7b06ce4bdf059fe7912cbdc
Author: Damian Johnson <atagar at torproject.org>
Date:   Wed Oct 11 19:06:17 2017 +0200

    Interpreter scrolling off by one
    
    When the interpreter panel has content the scollbar doesn't report itself as
    being at the bottom.
---
 nyx/panel/interpreter.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nyx/panel/interpreter.py b/nyx/panel/interpreter.py
index 64a9556..63cceba 100644
--- a/nyx/panel/interpreter.py
+++ b/nyx/panel/interpreter.py
@@ -128,7 +128,7 @@ class InterpreterPanel(nyx.panel.Panel):
 
     if len(self._lines) > subwindow.height - 2:
       self._x_offset = 2
-      subwindow.scrollbar(1, scroll, len(self._lines))
+      subwindow.scrollbar(1, scroll, len(self._lines) + 1)
 
     for i, line in enumerate(self._lines + [prompt]):
       x, y = self._x_offset, i + 1 - scroll





More information about the tor-commits mailing list