Escaped "value" parameter to initVariable, so it is a valid literal-string.

This commit is contained in:
paddyoloughlin 2010-07-31 01:30:19 +08:00 committed by Martin Grenfell
parent a997ab3341
commit 88aaba22b5

View File

@ -39,7 +39,7 @@ set cpo&vim
"1 if the var is set, 0 otherwise
function! s:initVariable(var, value)
if !exists(a:var)
exec 'let ' . a:var . ' = ' . "'" . a:value . "'"
exec 'let ' . a:var . ' = ' . "'" . substitute(a:value, "'", "''", "g") . "'"
return 1
endif
return 0