Move one if check into python code

Reason: this removes one useless indentation level that breaks “tabs for
indentation, spaces for alignment” rule.
This commit is contained in:
ZyX 2014-08-26 20:19:04 +04:00
parent 39a7142cb7
commit 644dec76e0

View File

@ -107,8 +107,8 @@ finally
call s:rcmd(" import powerline") call s:rcmd(" import powerline")
call s:rcmd(" except ImportError:") call s:rcmd(" except ImportError:")
call s:rcmd(" print('Unable to import powerline, is it installed?')") call s:rcmd(" print('Unable to import powerline, is it installed?')")
if strpart(expand('<sfile>'), 0, 5) !=# '/usr/'
call s:rcmd(" else:") call s:rcmd(" else:")
call s:rcmd(" if not vim.eval('expand(\"<sfile>\")').startswith('/usr/'):")
call s:rcmd(" import os") call s:rcmd(" import os")
call s:rcmd(" powerline_dir = os.path.realpath(os.path.normpath(powerline.__file__))") call s:rcmd(" powerline_dir = os.path.realpath(os.path.normpath(powerline.__file__))")
call s:rcmd(" powerline_dir = os.path.dirname(powerline.__file__)") call s:rcmd(" powerline_dir = os.path.dirname(powerline.__file__)")
@ -132,7 +132,6 @@ finally
call s:rcmd(" print('one in ' + real_powerline_dir + ', other in ' + real_this_dir + '.')") call s:rcmd(" print('one in ' + real_powerline_dir + ', other in ' + real_this_dir + '.')")
call s:rcmd(" print('You should remove one of this. Check out troubleshooting section,')") call s:rcmd(" print('You should remove one of this. Check out troubleshooting section,')")
call s:rcmd(" print('it contains some information about the alternatives.')") call s:rcmd(" print('it contains some information about the alternatives.')")
endif
call s:rcmd("try:") call s:rcmd("try:")
call s:rcmd(" powerline_troubleshoot()") call s:rcmd(" powerline_troubleshoot()")
call s:rcmd("finally:") call s:rcmd("finally:")