From 41e7016e5cc894f4a56c757248896be84fbcb16b Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 6 May 2022 21:37:08 +0200 Subject: [PATCH] Prefer --listen over obsolete $NVIM_LISTEN_ADDRESS Current nvim master is still reading $NVIM_LISTEN_ADDRESS, but it is considered obsolete and could be removed soon in favor of --listen. --- nvr/nvr.py | 10 ++++------ setup.py | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/nvr/nvr.py b/nvr/nvr.py index 87edf78..b06cde7 100644 --- a/nvr/nvr.py +++ b/nvr/nvr.py @@ -73,16 +73,14 @@ class Nvr(): Use --nostart to avoid starting a new process. ''')) - args = os.environ.get('NVR_CMD') - args = args.split(' ') if args else ['nvim'] + arg0 = os.environ.get('NVR_CMD') or 'nvim' - multiprocessing.Process(target=self.try_attach, args=(args, nvr, options, arguments)).start() + multiprocessing.Process(target=self.try_attach, args=([arg0], nvr, options, arguments)).start() - os.environ['NVIM_LISTEN_ADDRESS'] = self.address try: - os.execvpe(args[0], args, os.environ) + os.execvpe(arg0, [arg0, '--listen', self.address], os.environ) except FileNotFoundError: - print(f'[!] Can\'t start new nvim process: `{args[0]}` is not in $PATH.') + print(f'[!] Can\'t start new nvim process: `{arg0}` is not in $PATH.') sys.exit(1) def read_stdin_into_buffer(self, cmd): diff --git a/setup.py b/setup.py index 3313778..c6bd19c 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( 'console_scripts': ['nvr = nvr.nvr:main'] }, packages = ['nvr'], - version = '2.4.2', + version = '2.5.0', license = 'MIT', keywords = 'neovim nvim nvr remote helper', classifiers = [