mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
Fix using the `new_tab !neighbor` action changing the order of the non-neighboring tabs
Fixes #1256
This commit is contained in:
@@ -28,6 +28,9 @@ Changelog
|
|||||||
- Add an action to resize windows that can be mapped to shortcuts in :file:`kitty.conf`
|
- Add an action to resize windows that can be mapped to shortcuts in :file:`kitty.conf`
|
||||||
(:pull:`1245`)
|
(:pull:`1245`)
|
||||||
|
|
||||||
|
- Fix using the ``new_tab !neighbor`` action changing the order of the
|
||||||
|
non-neighboring tabs (:iss:`1256`)
|
||||||
|
|
||||||
|
|
||||||
0.13.1 [2018-12-06]
|
0.13.1 [2018-12-06]
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|||||||
@@ -522,8 +522,9 @@ class TabManager: # {{{
|
|||||||
self._add_tab(Tab(self, special_window=special_window, cwd_from=cwd_from))
|
self._add_tab(Tab(self, special_window=special_window, cwd_from=cwd_from))
|
||||||
self._set_active_tab(idx)
|
self._set_active_tab(idx)
|
||||||
if len(self.tabs) > 2 and as_neighbor and idx != nidx:
|
if len(self.tabs) > 2 and as_neighbor and idx != nidx:
|
||||||
self.tabs[idx], self.tabs[nidx] = self.tabs[nidx], self.tabs[idx]
|
for i in range(idx, nidx, -1):
|
||||||
swap_tabs(self.os_window_id, idx, nidx)
|
self.tabs[i], self.tabs[i-1] = self.tabs[i-1], self.tabs[i]
|
||||||
|
swap_tabs(self.os_window_id, i, i-1)
|
||||||
self._set_active_tab(nidx)
|
self._set_active_tab(nidx)
|
||||||
idx = nidx
|
idx = nidx
|
||||||
self.mark_tab_bar_dirty()
|
self.mark_tab_bar_dirty()
|
||||||
|
|||||||
Reference in New Issue
Block a user