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.
pull/179/head v2.5.0
Marco Hinz 2 years ago
parent 9168686f50
commit 41e7016e5c
No known key found for this signature in database

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

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

Loading…
Cancel
Save