If you specify a plugin name that contains control characters or backslashes to denops#plugin#load(), an error will occur or it will not work correctly.
Provide a minimal vimrc with less than 50 lines to reproduce
set rtp+=/path/to/github.com/vim-denops/denops.vim
let g:denops#debug = 1
autocmd User DenopsReady call denops#plugin#load("foo\nbar", '/path/to/plugin.ts')
plugin.ts
const main = () => {
console.log("Hello");
};
How to reproduce the problem from Vim startup
Place denops.vim, vimrc and plugin.ts to correct path.
Run vim -Nu vimrc.
Expected behavior
If an invalid name is specified, a proper error should be thrown.
Actual behavior
:message
[denops] load plugin: ['foo
[denops] bar', '/path/to/plugin.ts']
[denops] DenopsPluginPre:foo
[denops] DenopsPluginPost:foo
[denops] Failed to emit DenopsSystemPluginPre:foo
[denops] bar: Error: Failed to call 'denops#api#cmd' in Vim: Vim:E492: Not an editor command: bar
[denops] function denops#api#vim#call[2]..denops#api#cmd, line 2
[denops] Failed to emit DenopsSystemPluginPost:foo
[denops] bar: Error: Failed to call 'denops#api#cmd' in Vim: Vim:E492: Not an editor command: bar
[denops] function denops#api#vim#call[2]..denops#api#cmd, line 2
Describe the bug
If you specify a plugin name that contains control characters or backslashes to
denops#plugin#load()
, an error will occur or it will not work correctly.Provide a minimal vimrc with less than 50 lines to reproduce
plugin.ts
How to reproduce the problem from Vim startup
vim -Nu vimrc
.Expected behavior
If an invalid name is specified, a proper error should be thrown.
Actual behavior
:message
Your environment
Microsoft Windows [Version 10.0.22631.3880]
commit cfa35fcc7a9326b93ff7e88f71aaee0e71a7cd72 (grafted, HEAD -> v7-pre)