Skip to content

Commit

Permalink
Only set invisible cursor attribute if both curses and the terminal s…
Browse files Browse the repository at this point in the history
…upport it.
  • Loading branch information
alexeyklyukin committed Jul 29, 2013
1 parent df13d3c commit cef4bbb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pg_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,11 @@ def __init__(self, screen):
def _init_display(self):
""" Various ncurses initialization calls """

curses.curs_set(0) # make the cursor invisible
if hasattr(curses, 'curs_set'):
try:
curses.curs_set(0) # make the cursor invisible
except:
pass
self.screen.nodelay(1) # disable delay when waiting for keyboard input

# initialize colors
Expand Down

0 comments on commit cef4bbb

Please sign in to comment.