summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-01-23 09:29:28 +0100
committermathieui <mathieui@mathieui.net>2013-01-23 09:29:28 +0100
commit61f469bc128203a39a894f770bca67c18ad11a3e (patch)
tree771b46807020fb2f4812bf6aa1183cb95cca1a68 /src
parent6a81c021e18365c15703db868a9904eb196c7e03 (diff)
downloadpoezio-61f469bc128203a39a894f770bca67c18ad11a3e.tar.gz
poezio-61f469bc128203a39a894f770bca67c18ad11a3e.tar.bz2
poezio-61f469bc128203a39a894f770bca67c18ad11a3e.tar.xz
poezio-61f469bc128203a39a894f770bca67c18ad11a3e.zip
Don’t rebuild the lines on resize when the width has not changed
- because it is an heavy operation, and it is useless, since the lines only change when the width changes.
Diffstat (limited to 'src')
-rw-r--r--src/windows.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py
index e3a8d136..f0911086 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -946,8 +946,12 @@ class TextWin(Win):
def resize(self, height, width, y, x, room=None):
with g_lock:
+ if hasattr(self, 'width'):
+ old_width = self.width
+ else:
+ old_width = None
self._resize(height, width, y, x)
- if room:
+ if room and self.width != old_width:
self.rebuild_everything(room)
def rebuild_everything(self, room):