1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 07:50:05 +08:00
This commit is contained in:
wsdjeg 2017-11-09 20:43:09 +08:00
parent 7b4284ae18
commit e7e6bd955d

View File

@ -8,8 +8,11 @@
" This function should not be called twice!
let s:flag = 0
function! SpaceVim#server#connect()
if s:flag == 0
if empty($SPACEVIM_SERVER_ADDRESS)
let $SPACEVIM_SERVER_ADDRESS = fnamemodify('/tmp/' . (has('nvim') ? 'spacevim_nvim_' : 'spacevim_vim_') . 'server', ':p')
endif
@ -25,6 +28,8 @@ function! SpaceVim#server#connect()
call SpaceVim#logger#info('SpaceVim server startup at:' . $SPACEVIM_SERVER_ADDRESS)
endif
endif
let s:flag = 1
endif
endfunction