Use helper function relpath() instead of os.path.relpath() to address

issue #1044 ("path is on mount %r, start on mount %r" exception thrown
on Windows if Python and jedi-vim are installed on different drives)
This commit is contained in:
Konstantin-Glukhov
2021-02-16 04:25:02 +09:00
parent 5d4615707f
commit 8730095b89
2 changed files with 2 additions and 1 deletions

View File

@@ -53,5 +53,6 @@ Tommy Allen (@tweekmonster)
Mingliang (@Aulddays)
Brian Mego (@brianmego)
Stevan Milic (@stevanmilic) <stevan.milic@yahoo.com>
Konstantin Glukhov (@Konstantin-Glukhov)
@something are github user names.

View File

@@ -1112,7 +1112,7 @@ def set_buffer(path: Optional[Path], options='', using_tagstack=False):
if path in (vim.current.buffer.name, os.path.abspath(vim.current.buffer.name)):
return True
path = os.path.relpath(path)
path = relpath(path)
# options are what you can to edit the edit options
if int(vim_eval('g:jedi#use_tabs_not_buffers')) == 1:
_tabnew(path, options)