Minor refactor.

This commit is contained in:
Andy Stewart
2015-08-17 09:45:31 +02:00
parent 0ca15c8ad2
commit 62462a25a7
2 changed files with 11 additions and 15 deletions

View File

@@ -1,6 +1,7 @@
let s:file = ''
let s:using_xolox_shell = -1
let s:exit_code = 0
let s:fish = &shell =~# 'fish'
function! gitgutter#utility#warn(message)
echohl WarningMsg
@@ -131,8 +132,7 @@ function! gitgutter#utility#file_relative_to_repo_root()
endfunction
function! gitgutter#utility#command_in_directory_of_file(cmd)
let l:fish = &shell =~# 'fish'
return 'cd ' . gitgutter#utility#shellescape(gitgutter#utility#directory_of_file()) . (l:fish ? '; and ' : ' && ') . a:cmd
return 'cd '.gitgutter#utility#shellescape(gitgutter#utility#directory_of_file()) . (s:fish ? '; and ' : ' && ') . a:cmd
endfunction
function! gitgutter#utility#highlight_name_for_change(text)