Fix a regression that broke the edit action in the remote file kitten

This commit is contained in:
Kovid Goyal 2021-08-13 16:59:40 +05:30
parent b173dd1c39
commit 5a92d3f312
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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