From e6797c29a5f20b50ed35ef25922596bab047d0f6 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 6 Nov 2011 00:15:38 +0100 Subject: =?UTF-8?q?Smaller=20means=20being=20insane,=20and=20even=20then,?= =?UTF-8?q?=20it=20should=E2=80=99nt=20bug=20too=20much=20Fixes=20#2259?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core.py | 3 +++ src/tabs.py | 4 ++-- src/windows.py | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core.py b/src/core.py index 5fcdf8a3..ec821cbd 100644 --- a/src/core.py +++ b/src/core.py @@ -230,6 +230,9 @@ class Core(object): return self.information_buffer def grow_information_win(self, nb=1): + if self.information_win_size >= self.current_tab().height -5 or \ + self.information_win_size+nb >= self.current_tab().height-4: + return if self.information_win_size == 14: return self.information_win_size += nb diff --git a/src/tabs.py b/src/tabs.py index 2297cf86..5c8ba962 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -13,8 +13,8 @@ Each Tab object has different refresh() and resize() methods, defining how its Windows are displayed, resized, etc """ -MIN_WIDTH = 50 -MIN_HEIGHT = 22 +MIN_WIDTH = 42 +MIN_HEIGHT = 6 import logging log = logging.getLogger(__name__) diff --git a/src/windows.py b/src/windows.py index 1612e416..1701fee7 100644 --- a/src/windows.py +++ b/src/windows.py @@ -62,9 +62,10 @@ class Win(object): self._win = None def _resize(self, height, width, y, x): - self.height, self.width, self.x, self.y = height, width, x, y if height == 0 or width == 0: + self.height, self.width = height, width return + self.height, self.width, self.x, self.y = height, width, x, y if not self._win: self._win = curses.newwin(height, width, y, x) else: -- cgit v1.2.3