From 726c693edf80fb593ba4bd0ffbaef26455fcc306 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 7 Oct 2025 22:27:57 +0530 Subject: [PATCH] Avoid reading shell env twice to get editor Its cached, but still... --- kitty/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/utils.py b/kitty/utils.py index 6b5b4b3e9..2fa015052 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -541,7 +541,8 @@ def get_editor_from_env(env: Mapping[str, str]) -> str | None: def get_editor_from_env_vars(opts: Options | None = None) -> list[str]: - editor = get_editor_from_env(os.environ) + from .child import default_env + editor = get_editor_from_env(default_env()) if not editor: shell_env = read_shell_environment(opts) editor = get_editor_from_env(shell_env)