From eb180ed52ee12784ec35213aa89413114a94297e Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 9 Sep 2011 19:12:20 +0200 Subject: Add (optional) lazy resize, and also fix the screen becoming empty when resizing to a lower width. --- data/default_config.cfg | 5 +++++ src/core.py | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/data/default_config.cfg b/data/default_config.cfg index 92bdcd60..5e9f35d6 100644 --- a/data/default_config.cfg +++ b/data/default_config.cfg @@ -189,6 +189,11 @@ send_time = true max_messages_in_memory = 2048 max_lines_in_memory = 2048 +# Defines if all tabs are resized at the same time (if set to false) +# or if they are really resized only when needed (if set to true). +# “true” should be the most comfortable value +lazy_resize = true + [bindings] # Bindings are keyboard shortcut aliases. You can use them # to define your own keys and bind them with some functions diff --git a/src/core.py b/src/core.py index bda47aa3..e25be58f 100644 --- a/src/core.py +++ b/src/core.py @@ -677,8 +677,11 @@ class Core(object): self.resize_global_information_win() with resize_lock: for tab in self.tabs: - tab.resize() - self.refresh_window() + if config.get('lazy_resize', 'true') == 'true': + tab.need_resize = True + else: + tab.resize() + self.full_screen_redraw() def read_keyboard(self): """ -- cgit v1.2.3