Closed beelzebielsk closed 5 years ago
I can confirm this bug. Recently I updated my neovim-remote (after a long time) and instantly got this error.
The file is openend in neovim but the command is not run as stated above.
I started looking at the source myself. It seems the problem is that the commands being passed in keep the +
at the start. For instance, for the command:
nvr --remote-tab-wait +'set bufhidden=delete' file
This command +'set bufhidden=delete' would be executed in line 149 of nvr.py, and the actual text of the command is '+set bufhidden=delete' with the + at the start.
If I write exactly this as an ex command in vim
:+set bufhidden=delete
I get a no range allowed error.
If I change line 149 to
self.server.command(cmd[1:] if cmd else '$')
To lop off the leading '+', then everything works correctly.
I can fix this myself, though I'm curious as to how it should be done. I feel like this should have been noticed ages ago because all commands passed in using '+' should have caused this error; I'm just wondering if there's actually something more subtle going on, somehow.
I could leave this little fix at line 149 which seems hacky, or I can fix it at line 348 inside of split_cmds_from_files
.
For now, I'm going to make a fork and submit a pull request with a change, let me know if there's anything I should do differently.
I'm running a command straight from the help description
With
file
changed to something that exists on my computer. My nvr version is2.2.0
, and my nvim version is0.3.8
. I get the error E481: No range allowed. The exact stacktrace I get back from nvr is:EDIT: My python version is
3.7.4
And the command isn't run.