From 40eb8455d040483da7f7a520feb7fbaa13591200 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 9 Jul 2020 22:29:24 +0530 Subject: [PATCH] Fix ``launch --location=last`` not working Fixes #2841 --- docs/changelog.rst | 4 ++++ kitty/launch.py | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 7608d271f..1342b07ea 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -15,6 +15,8 @@ To update |kitty|, :doc:`follow the instructions `. - 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 `. - 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] -------------------- diff --git a/kitty/launch.py b/kitty/launch.py index 98c414642..fb96749c7 100644 --- a/kitty/launch.py +++ b/kitty/launch.py @@ -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