summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-09-09 19:12:20 +0200
committerFlorent Le Coz <louiz@louiz.org>2011-09-09 19:12:20 +0200
commiteb180ed52ee12784ec35213aa89413114a94297e (patch)
tree47f8008fd2cb2eeb7959aedd8cbd4d68932f613d
parentff6f829e8d382da6261790f8535002e2da393ec3 (diff)
downloadpoezio-eb180ed52ee12784ec35213aa89413114a94297e.tar.gz
poezio-eb180ed52ee12784ec35213aa89413114a94297e.tar.bz2
poezio-eb180ed52ee12784ec35213aa89413114a94297e.tar.xz
poezio-eb180ed52ee12784ec35213aa89413114a94297e.zip
Add (optional) lazy resize, and also fix the screen becoming empty when resizing to a lower width.
-rw-r--r--data/default_config.cfg5
-rw-r--r--src/core.py7
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):
"""