Fix traceback in neovim: vim.vars returns str

This commit is contained in:
Ben Jackson 2020-05-24 12:16:04 +01:00
commit 7705d6020c

View file

@ -566,9 +566,12 @@ def HideSplash( api_prefix, splash ):
def GetVimspectorBase(): def GetVimspectorBase():
try: base = vim.vars.get( 'vimspector_base_dir' )
return vim.vars[ 'vimspector_base_dir' ].decode( 'utf-8' ) if base is None:
except KeyError:
return os.path.abspath( os.path.join( os.path.dirname( __file__ ), return os.path.abspath( os.path.join( os.path.dirname( __file__ ),
'..', '..',
'..' ) ) '..' ) )
elif isinstance( base, bytes ):
return base.decode( 'utf-8' )
else:
return base