|
|
|
@ -38,7 +38,6 @@ class Nvr():
|
|
|
|
|
def __init__(self, address, silent=False):
|
|
|
|
|
self.address = address
|
|
|
|
|
self.server = None
|
|
|
|
|
self.proc = None
|
|
|
|
|
self.silent = silent
|
|
|
|
|
self.wait = 0
|
|
|
|
|
self.started_new_process = False
|
|
|
|
@ -70,12 +69,12 @@ class Nvr():
|
|
|
|
|
os.environ['NVIM_LISTEN_ADDRESS'] = self.address
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
self.proc = subprocess.Popen(args)
|
|
|
|
|
pid = subprocess.Popen(args).pid
|
|
|
|
|
except FileNotFoundError:
|
|
|
|
|
print("[!] Can't start new nvim process: '{}' is not in $PATH.".format(args[0]))
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
if self.proc.pid:
|
|
|
|
|
if pid:
|
|
|
|
|
for i in range(10):
|
|
|
|
|
self.attach()
|
|
|
|
|
if self.server:
|
|
|
|
@ -570,8 +569,6 @@ def main(argv=sys.argv, env=os.environ):
|
|
|
|
|
|
|
|
|
|
nvr.server.close()
|
|
|
|
|
|
|
|
|
|
if nvr.started_new_process:
|
|
|
|
|
nvr.proc.wait()
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
main()
|
|
|
|
|