From 5a92d3f312e7b7ec72315dcb1ba0d6ebc2b2261e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Aug 2021 16:59:40 +0530 Subject: [PATCH] Fix a regression that broke the edit action in the remote file kitten --- kitty/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kitty/utils.py b/kitty/utils.py index 9aebe79f4..429570efa 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -528,7 +528,12 @@ def get_editor_from_env_vars(opts: Optional[Options] = None) -> List[str]: def get_editor(opts: Optional[Options] = None) -> List[str]: if opts is None: from .fast_data_types import get_options - opts = get_options() + try: + opts = get_options() + except RuntimeError: + # we are in a kitten + from .cli import create_default_opts + opts = create_default_opts() if opts.editor == '.': return get_editor_from_env_vars() import shlex