summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-01-07 23:41:17 +0100
committermathieui <mathieui@mathieui.net>2013-01-07 23:41:34 +0100
commitb0fbbc9fa9c5a893d9babf0f8c86af04c32af019 (patch)
tree4ec54c3cf472193f0371afb30baf96134b95c06c /src
parent229d56456b6c0c3d389706056dc6e754ae733e74 (diff)
downloadpoezio-b0fbbc9fa9c5a893d9babf0f8c86af04c32af019.tar.gz
poezio-b0fbbc9fa9c5a893d9babf0f8c86af04c32af019.tar.bz2
poezio-b0fbbc9fa9c5a893d9babf0f8c86af04c32af019.tar.xz
poezio-b0fbbc9fa9c5a893d9babf0f8c86af04c32af019.zip
Fix the behaviour of /move_tab
Diffstat (limited to 'src')
-rw-r--r--src/core.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py
index 3d5f8268..b2e16e85 100644
--- a/src/core.py
+++ b/src/core.py
@@ -736,8 +736,13 @@ class Core(object):
done = False
# Remove the first Gap on the right in the list
# in order to prevent global shifts when there is empty space
- if i < len(self.tabs) and not self.tabs[i]:
- self.tabs.pop(i)
+ while not done:
+ i += 1
+ if i >= len(self.tabs):
+ done = True
+ elif not self.tabs[i]:
+ self.tabs.pop(i)
+ done = True
# Remove the trailing gaps
i = len(self.tabs) - 1
while isinstance(self.tabs[i], tabs.GapTab):