2
0
mirror of https://github.com/mhinz/neovim-remote synced 2024-11-11 13:10:34 +00:00

Support multiple + commands and let empty + go to the last line

This commit is contained in:
Harm te Hennepe 2017-08-02 11:05:21 +02:00 committed by Marco Hinz
parent ee9a6c4f39
commit a85aa94321

View File

@ -98,11 +98,14 @@ class Neovim():
if not self.is_attached(silent):
return
c = None
c = []
for fname in reversed(arguments):
if fname.startswith('+'):
c = fname[1:]
if fname[1:]:
c.insert(0, fname[1:])
else:
c.insert(0, '$')
continue
if fname == '-':
@ -125,10 +128,10 @@ class Neovim():
else:
bvars['nvr'] = [chanid]
if c:
self.server.command(c)
for cmd in c:
self.server.command(cmd)
return len(arguments) - (1 if c else 0)
return len(arguments) - len(c)
def _show_msg(self, old_address):
o = old_address