From 870c30b2316b3217fe4cf706d788f75151ac6537 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 14 Feb 2010 23:29:14 +0100 Subject: console: Ensure that cursor is hidden after closing console --- ranger/gui/widgets/console.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index 754ca870..3dfa0ce7 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -42,7 +42,7 @@ class Console(Widget): mode = None visible = False commandlist = None - last_cursor_mode = 1 + last_cursor_mode = None prompt = ':' copy = '' tab_deque = None @@ -88,7 +88,8 @@ class Console(Widget): cls = mode_to_class(mode) - self.last_cursor_mode = curses.curs_set(1) + if self.last_cursor_mode is None: + self.last_cursor_mode = curses.curs_set(1) self.mode = mode self.__class__ = cls self.history = self.histories[DEFAULT_HISTORY] @@ -103,7 +104,9 @@ class Console(Widget): return True def close(self): - curses.curs_set(self.last_cursor_mode) + if self.last_cursor_mode is not None: + curses.curs_set(self.last_cursor_mode) + self.last_cursor_mode = None self.add_to_history() self.tab_deque = None self.clear() -- cgit 1.4.1-2-gfad0 am <vc@akkartik.com>
about summary refs log blame commit diff stats
path: root/html/linux/108write.subx.html
blob: 8c16dd28b48dc5681c04bea75aea9e2defedff9e (plain) (tree)
1
2
3
4
5
6
7
8
9