summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-06 00:15:38 +0100
committermathieui <mathieui@mathieui.net>2011-11-06 00:15:38 +0100
commite6797c29a5f20b50ed35ef25922596bab047d0f6 (patch)
tree0444b05c478e7b7266ae084379670445272561c6
parentaf6e5345781381fbfab48552684a2c621989a24d (diff)
downloadpoezio-e6797c29a5f20b50ed35ef25922596bab047d0f6.tar.gz
poezio-e6797c29a5f20b50ed35ef25922596bab047d0f6.tar.bz2
poezio-e6797c29a5f20b50ed35ef25922596bab047d0f6.tar.xz
poezio-e6797c29a5f20b50ed35ef25922596bab047d0f6.zip
Smaller means being insane, and even then, it should’nt bug too much
Fixes #2259
-rw-r--r--src/core.py3
-rw-r--r--src/tabs.py4
-rw-r--r--src/windows.py3
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: