Fix traceback in neovim: vim.vars returns str
This commit is contained in:
parent
2b22d3d29f
commit
7705d6020c
1 changed files with 6 additions and 3 deletions
|
|
@ -566,9 +566,12 @@ def HideSplash( api_prefix, splash ):
|
|||
|
||||
|
||||
def GetVimspectorBase():
|
||||
try:
|
||||
return vim.vars[ 'vimspector_base_dir' ].decode( 'utf-8' )
|
||||
except KeyError:
|
||||
base = vim.vars.get( 'vimspector_base_dir' )
|
||||
if base is None:
|
||||
return os.path.abspath( os.path.join( os.path.dirname( __file__ ),
|
||||
'..',
|
||||
'..' ) )
|
||||
elif isinstance( base, bytes ):
|
||||
return base.decode( 'utf-8' )
|
||||
else:
|
||||
return base
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue