From b0fbbc9fa9c5a893d9babf0f8c86af04c32af019 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 7 Jan 2013 23:41:17 +0100 Subject: Fix the behaviour of /move_tab --- src/core.py | 9 +++++++-- 1 file 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): -- cgit v1.2.3