From a7d30a199def6ffba433507208cd904fd04000e3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 13 Nov 2019 15:40:46 +0530 Subject: [PATCH] location should also apply to tab creation --- kitty/launch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kitty/launch.py b/kitty/launch.py index fb44c7b85..6a4fe24e9 100644 --- a/kitty/launch.py +++ b/kitty/launch.py @@ -70,7 +70,9 @@ type=choices default=last choices=first,neighbor,last Where to place the newly created window when it is added to a tab which -already has existing windows in it. +already has existing windows in it. Also applies to creating a new tab, +where the value of neighbor will cause the new tab to be placed next to +the current tab instead of at the end. --allow-remote-control @@ -137,7 +139,7 @@ def get_env(opts, active_child): def tab_for_window(boss, opts, target_tab=None): if opts.type == 'tab': tm = boss.active_tab_manager - tab = tm.new_tab(empty_tab=True) + tab = tm.new_tab(empty_tab=True, as_neighbor=opts.location == 'neighbor') if opts.tab_title: tab.set_title(opts.tab_title) elif opts.type == 'os-window':