ternjs/tern_for_vim

Error caused by 'decode' under python3

Closed this issue · 0 comments

Environment: vim + python3 support. When opening a js file the plugin reported "'str' object has no attribute 'decode'"

After diagnosing it seems in

tern.py, line 61:

mydir = mydir.decode(vim.eval('&encoding'))

should be guarded as:

if PY2:
    mydir = mydir.decode(vim.eval('&encoding'))