mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-25 01:38:36 +08:00
vim: goto jumps now appear at the top of the screen
This commit is contained in:
+3
-2
@@ -352,8 +352,8 @@ import vim
|
|||||||
# update the system path, to include the python scripts
|
# update the system path, to include the python scripts
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
from os.path import dirname
|
from os.path import dirname, abspath
|
||||||
sys.path.insert(0, dirname(dirname(vim.eval('s:current_file'))))
|
sys.path.insert(0, dirname(dirname(abspath(vim.eval('s:current_file')))))
|
||||||
|
|
||||||
import traceback # for exception output
|
import traceback # for exception output
|
||||||
import re
|
import re
|
||||||
@@ -415,6 +415,7 @@ def _goto(is_definition=False, is_related_name=False, no_output=False):
|
|||||||
else:
|
else:
|
||||||
vim.command('edit ' + d.module_path)
|
vim.command('edit ' + d.module_path)
|
||||||
vim.current.window.cursor = d.line_nr, d.column
|
vim.current.window.cursor = d.line_nr, d.column
|
||||||
|
vim.command('normal! zt') # cursor at top of screen
|
||||||
else:
|
else:
|
||||||
# multiple solutions
|
# multiple solutions
|
||||||
lst = []
|
lst = []
|
||||||
|
|||||||
Reference in New Issue
Block a user