vim-stardict
vim-stardict copied to clipboard
E46: Cannot change read-only variable "a:orgArgs"
Hi, I've got this error message when executing :StarDictCursor
over the word "throughly". Despite the annoying message, definition still was displayed.
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 4 2016 18:44:05) Included patches: 1-124
Error detected while processing function stardict#StarDict[1]..stardict#GetDefinition[5]..stardict#GetArgsList:
line 9:
E742: Cannot change value of insert() argument
E46: Cannot change read-only variable "a:orgArgs"
line 15:
E742: Cannot change value of insert() argument
E46: Cannot change read-only variable "a:orgArgs"
['throughly']
Hi @oblitum thank you for using the plugin. There seems to be some changes in the way deepcopy() function works in Vim 8.0, which introduces this error.
To suppress the annoying error message, you can map your :StarDictCursor
command as follow:
nnoremap <localleader>sc :silent! StarDictCursor<CR>
Please let me know if this work-around works. I will spend some time to further investigate the issue.
Hi, thanks for looking into this, the workaround should work but I don't use any mapping since I rarely use the plugin, so I just prefer to execute the command. I'll wait for the fix. Thanks.
Thanks, it worked for me!