[27925] in Source-Commits
discuss-ng commit: Check the bounds for '[' and ']' keys
daemon@ATHENA.MIT.EDU (Victor Vasiliev)
Thu Mar 27 18:54:57 2014
Date: Thu, 27 Mar 2014 18:54:49 -0400
From: Victor Vasiliev <vasilvv@MIT.EDU>
Message-Id: <201403272254.s2RMsnM8002628@drugstore.mit.edu>
To: source-commits@MIT.EDU
https://github.com/mit-athena/discuss-ng/commit/9baae0842654ae9de54f607dfebf1f0058a1d496
commit 9baae0842654ae9de54f607dfebf1f0058a1d496
Author: Victor Vasiliev <vasilvv@mit.edu>
Date: Thu Mar 27 18:46:11 2014 -0400
Check the bounds for '[' and ']' keys
ndsc | 2 ++
setup.py | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ndsc b/ndsc
index fbfb1e7..9d056af 100755
--- a/ndsc
+++ b/ndsc
@@ -338,9 +338,11 @@ def main_loop():
textpos_y -= rows - 2
if ch == ord('['):
pos_cur -= 1
+ pos_cur = max(pos_cur, 0)
handle_transaction_view()
if ch == ord(']'):
pos_cur += 1
+ pos_cur = min(pos_cur, len(transactions) - 1)
handle_transaction_view()
except discuss.DiscussError as err:
status_bar = str(err).split("\n")[0]
diff --git a/setup.py b/setup.py
index 065ca85..2058c2e 100755
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
from distutils.core import setup
setup(name='discuss-ng',
- version='1.1',
+ version='1.1.1',
description='User interface front-end to the discuss network forum system',
author='Victor Vasiliev',
scripts=['meeting', 'ndsc']