vim-stardict icon indicating copy to clipboard operation
vim-stardict copied to clipboard

E46: Cannot change read-only variable "a:orgArgs"

Open oblitum opened this issue 8 years ago • 3 comments

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']

oblitum avatar Dec 12 '16 04:12 oblitum

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.

phongvcao avatar Dec 12 '16 09:12 phongvcao

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.

oblitum avatar Dec 12 '16 16:12 oblitum

Thanks, it worked for me!

Amooti73 avatar Apr 09 '20 14:04 Amooti73