moved up the split_options

This commit is contained in:
LittleQ
2013-09-15 00:29:56 +08:00
parent ec405fa3b2
commit 63162524c2

View File

@@ -401,22 +401,16 @@ def new_buffer(path, options=''):
_tabnew(path, options)
elif not vim_eval('g:jedi#use_splits_not_buffers') == '1':
user_split_option = vim_eval('g:jedi#use_splits_not_buffers')
split_options = [
'top',
'right',
'left',
'bottom'
]
split_options = {
'top': 'topleft split',
'left': 'topleft vsplit',
'right': 'botright vsplit',
'bottom': 'botright split'
}
if user_split_option not in split_options:
print('g:jedi#use_splits_not_buffers value is not correct, valid options are: %s' % ','.join(split_options))
else:
VIM_SPLIT_COMMAND = {
'top': 'topleft split',
'left': 'topleft vsplit',
'right': 'botright vsplit',
'bottom': 'botright split'
}
vim_command(VIM_SPLIT_COMMAND[user_split_option] + " %s" % path)
vim_command(split_options[user_split_option] + " %s" % path)
else:
if vim_eval("!&hidden && &modified") == '1':
if vim_eval("bufname('%')") is None: