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