scrooloose/nerdcommenter — Issue #54: s:HasCStyleComments expression fails in Vim 7.0
Author: martijn
Created: 2011-12-22 21:27:18+00:00
State: open

This was encountered on Vim 7.0.237, the stock version for Red Hat and CentOS 5. When toggling a comment the expression in s:HasCStyleComments yields the following error:

E685: Internal error: get_tv_string_buf()
E116: Invalid arguments for function s:Left({'alt': 1}) == '/*' && s:Right({'alt': 1}) == '*/')
E15: Invalid expression: (s:Left() == '/*' && s:Right() == '*/') || (s:Left({'alt': 1}) == '/*' && s:Right({'alt': 1}) == '*/')

Since I lack vimscript-fu I don't know if this is easily fixed, but it sure would help for those of us stuck on older Vim versions. The error does not occur on newer Vim versions (the next oldest I have is 7.2.411 which works fine).