From 945cbca3873e0a339af50fc773a1d87b2db3d821 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 Feb 2021 09:14:12 +0530 Subject: [PATCH] hints kitten: When using the linenumber action with a background action, preserve the working directory Fixes #3352 --- docs/changelog.rst | 3 +++ kittens/hints/main.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 6c2cd592e..4d7484d94 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -78,6 +78,9 @@ To update |kitty|, :doc:`follow the instructions `. - macOS: Disable the native operating system tabs as they are non-functional and can be confusing (:iss:`3325`) +- hints kitten: When using the linenumber action with a background action, + preserve the working directory (:iss:`3352`) + 0.19.3 [2020-12-19] ------------------- diff --git a/kittens/hints/main.py b/kittens/hints/main.py index 4cacc71a0..0727193dd 100644 --- a/kittens/hints/main.py +++ b/kittens/hints/main.py @@ -698,7 +698,7 @@ def linenum_handle_result(args: List[str], data: Dict[str, Any], target_window_i w.paste_bytes(text + '\r') elif action == 'background': import subprocess - subprocess.Popen(cmd) + subprocess.Popen(cmd, cwd=data['cwd']) else: getattr(boss, { 'window': 'new_window_with_cwd', 'tab': 'new_tab_with_cwd', 'os_window': 'new_os_window_with_cwd'