From 8730095b89e7d964c390278de77191f4fcc750b2 Mon Sep 17 00:00:00 2001 From: Konstantin-Glukhov Date: Tue, 16 Feb 2021 04:25:02 +0900 Subject: [PATCH] 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) --- AUTHORS.txt | 1 + pythonx/jedi_vim.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index e87db71..843ddf9 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -53,5 +53,6 @@ Tommy Allen (@tweekmonster) Mingliang (@Aulddays) Brian Mego (@brianmego) Stevan Milic (@stevanmilic) +Konstantin Glukhov (@Konstantin-Glukhov) @something are github user names. diff --git a/pythonx/jedi_vim.py b/pythonx/jedi_vim.py index 70a524c..ad9fa94 100644 --- a/pythonx/jedi_vim.py +++ b/pythonx/jedi_vim.py @@ -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)