Fix `launch --location=last` not working

Fixes #2841
This commit is contained in:
Kovid Goyal 2020-07-09 22:29:24 +05:30
parent c46b36509b
commit 40eb8455d0
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 9 additions and 4 deletions

View file

@ -15,6 +15,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- macOS: Fix the LC_TYPE env var being set to UTF-8 on systems in which the
language and country code do not form a valid locale (:iss:`1233`)
- macOS: Fix :kbd:`cmd+plus` not changing font size (:iss:`2839`)
- Allow passing the current selection to kittens (:iss:`2796`)
- Allow setting the :opt:`background_opacity` of new OS windows created via
@ -29,6 +31,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- hints kitten: In linenumber mode expand paths that starts with ~
(:iss:`2822`)
- Fix ``launch --location=last`` not working (:iss:`2841`)
0.18.1 [2020-06-23]
--------------------

View file

@ -86,8 +86,8 @@ def options_spec() -> str:
--location
type=choices
default=last
choices=first,after,before,neighbor,last,vsplit,hsplit
default=default
choices=first,after,before,neighbor,last,vsplit,hsplit,default
Where to place the newly created window when it is added to a tab which
already has existing windows in it. :code:`after` and :code:`before` place the new
window before or after the active window. :code:`neighbor` is a synonym for :code:`after`.
@ -95,7 +95,8 @@ def options_spec() -> str:
will cause the new tab to be placed next to the current tab instead of at the end.
The values of :code:`vsplit` and :code:`hsplit` are only used by the :code:`splits`
layout and control if the new window is placed in a vertical or horizontal split
with the currently active window.
with the currently active window. The default is to place the window in a
layout dependent manner, typically, after the currently active window.
--allow-remote-control
@ -254,7 +255,7 @@ def launch(boss: Boss, opts: LaunchCLIOptions, args: List[str], target_tab: Opti
kw['cwd_from'] = active_child.pid_for_cwd
else:
kw['cwd'] = opts.cwd
if opts.location != 'last':
if opts.location != 'default':
kw['location'] = opts.location
if opts.copy_colors and active:
kw['copy_colors_from'] = active