summaryrefslogtreecommitdiff
path: root/interface/input
diff options
context:
space:
mode:
Diffstat (limited to 'interface/input')
-rwxr-xr-xinterface/input/tabcomp.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/interface/input/tabcomp.py b/interface/input/tabcomp.py
index 7479f97..c454ad2 100755
--- a/interface/input/tabcomp.py
+++ b/interface/input/tabcomp.py
@@ -61,6 +61,13 @@ class Input:
start = {}
for i, f in ctx:
+ if not i:
+ if None in parent.children:
+ raise ValueError("Duplicate base command")
+ parent.children.append(None)
+ parent.f = f
+ continue
+
if isinstance(i, str):
i = i.split(' ')
if i[0] not in start:
@@ -180,16 +187,20 @@ class Input:
## In the format:
## (input, parsed, display, is variable?)
path = [["", True, "", False]]
+ size_ok = True
while True:
with self._ctx_lock:
self._l1 = "".join((i[2] for i in path if i[2]))
with CURSES_LOCK:
- self._redraw()
+ if size_ok:
+ self._redraw()
l = self.win.getch()
with self._ctx_lock:
if l == curses.KEY_RESIZE:
if resize is not None:
- resize()
+ size_ok = resize()
+ continue
+ if not size_ok:
continue
if self._context is None:
continue