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:
parent
ee9a6c4f39
commit
a85aa94321
13
nvr/nvr.py
13
nvr/nvr.py
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user