Skip to content

Commit 593f961

Browse files
committed
implement DonJayamanne#381
1 parent 30947ce commit 593f961

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

pythonFiles/completion.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,18 +408,17 @@ def watch(self):
408408

409409
if __name__ == '__main__':
410410
jediPreview = False
411-
if len(sys.argv) > 1 and sys.argv[1] == 'preview':
411+
if len(sys.argv) > 0 and sys.argv[1] == 'preview':
412412
jediPath = os.path.join(os.path.dirname(__file__), 'preview', 'jedi')
413-
jediPreview = False
413+
jediPreview = True
414414
else:
415415
jediPath = os.path.join(os.path.dirname(__file__), 'release')
416416

417-
sys.path.append(jediPath)
417+
sys.path.insert(0, jediPath)
418418
import jedi
419419
if jediPreview:
420420
jedi.settings.cache_directory = os.path.join(
421421
jedi.settings.cache_directory, 'v' + jedi.__version__.replace('.', ''))
422-
423422
# remove jedi from path after we import it so it will not be completed
424423
sys.path.pop(0)
425424
JediCompletion().watch()

0 commit comments

Comments
 (0)