Closed oblitum closed 9 years ago
The json.dumps
calls are there precisely for escaping reasons. Are you sure you still need them when you use print
? It sounds like you'd get backslash escapes before quotes that you don't want.
@marijnh particularly I got the issue in a call that didn't have a json.dumps
call. Debugging I realized the issue was due to calling vim.command("echo '{0}'".format(text))
with text
like foo 'xyz' bar
, which leads to echo 'foo 'xyz' bar'
. Since the problem was due to having to call echo
with a string literal, and the string literal wasn't built correctly, I simply avoided the problem altogether by using print
which would achieve the same output effect without the need to build any literal, you just need to use the string variable directly.
Yes, but my question is, shouldn't we remove those calls to json.dumps entirely now that we aren't going through the Python/VIM boundary anymore?
@marijnh ah yes, I agree. I'll remove and rebase.
@marijnh done.
Thanks. Merged as 8e26ec9
When cursor is over code like the following:
it leads to the following stack trace because the plugin doesn't escape strings properly: