summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/core.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/core/core.py b/src/core/core.py
index 00d7b9a6..ad9ab264 100644
--- a/src/core/core.py
+++ b/src/core/core.py
@@ -1375,8 +1375,14 @@ class Core(object):
with g_lock:
self.tab_win.resize(1, tabs.Tab.width, tabs.Tab.height - 2, 0)
if config.get('enable_vertical_tab_list', False):
- height, width = self.stdscr.getmaxyx()
- truncated_win = self.stdscr.subwin(height, config.get('vertical_tab_list_size', 20), 0, 0)
+ try:
+ height, _ = self.stdscr.getmaxyx()
+ truncated_win = self.stdscr.subwin(height,
+ config.get('vertical_tab_list_size', 20),
+ 0, 0)
+ except:
+ log.error('Curses error on infobar resize', exc_info=True)
+ return
self.left_tab_win = windows.VerticalGlobalInfoBar(truncated_win)
else:
self.left_tab_win = None
@@ -1408,7 +1414,12 @@ class Core(object):
# on the left remaining space
if config.get('enable_vertical_tab_list', False):
with g_lock:
- scr = self.stdscr.subwin(0, config.get('vertical_tab_list_size', 20))
+ try:
+ scr = self.stdscr.subwin(0,
+ config.get('vertical_tab_list_size', 20))
+ except:
+ log.error('Curses error on resize', exc_info=True)
+ return
else:
scr = self.stdscr
tabs.Tab.resize(scr)