From 61f469bc128203a39a894f770bca67c18ad11a3e Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 23 Jan 2013 09:29:28 +0100 Subject: =?UTF-8?q?Don=E2=80=99t=20rebuild=20the=20lines=20on=20resize=20w?= =?UTF-8?q?hen=20the=20width=20has=20not=20changed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - because it is an heavy operation, and it is useless, since the lines only change when the width changes. --- src/windows.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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): -- cgit v1.2.3