From 82fda4544b2d3a04a2c67d8af2e11ddce0c61195 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 21 Jul 2011 00:37:13 +0200 Subject: fixed cur_set bug/added todo --- cholerab/cholerab-live/view.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cholerab') diff --git a/cholerab/cholerab-live/view.py b/cholerab/cholerab-live/view.py index 34891e5c..b798e712 100644 --- a/cholerab/cholerab-live/view.py +++ b/cholerab/cholerab-live/view.py @@ -26,6 +26,7 @@ class CursesView(threading.Thread): elif c == KEY_UP : self.y -=1 elif c == KEY_DOWN : self.y +=1 elif c == ord('q') : self.stop() + #TODO handle backspace correctly else : try: self.win.addch(c) #TODO UTF8 here @@ -57,10 +58,13 @@ class CursesView(threading.Thread): self.cholerab = cholerab threading.Thread.__init__(self) self.scr = initscr() - noecho() + noecho() cbreak() self.scr.keypad(1) - curs_set(2) + try: + curs_set(2) + except: # go home with your non-standard terminals! + pass begin_x = 0;begin_y = 0 self.height = height -- cgit v1.2.3