提交 fff8f8b6 编写于 作者: C Cosmin Popescu

merging the pull request

上级 be2a259f
......@@ -149,13 +149,22 @@ endfunction
function! s:start_sqlwb(type)
let vid = substitute(v:servername, '\v\/', '-', 'g') . sw#generate_unique_id()
let cmd = [g:sw_exe, '-feedback=true', '-showProgress=false', '-showTiming=true', '-nosettings', '-variable=vid=' . vid]
let valid_exe = 1
if !filereadable(g:sw_exe)
echom g:sw_exe . " is not readable. Make sure the setting g:sw_exe is set and the file exists."
let valid_exe = 0
endif
if match(getfperm(g:sw_exe), "r.x.*") ==# -1
echom g:sw_exe . " is not executable. Make sure the permissions are set correctly."
let valid_exe = 0
endif
if !valid_exe
return
endif
if !s:nvim
if !filereadable(g:sw_exe)
echom g:sw_exe . " is not readable. Make sure the setting g:sw_exe is set and the file exists."
endif
if match(getfperm(g:sw_exe), "r.x.*") ==# -1
echom g:sw_exe . " is not executable. Make sure the permissions are set correctly."
endif
let job = job_start(cmd, {'in_mode': 'raw', 'out_mode': 'raw'})
let pid = substitute(job, '\v^process ([0-9]+).*$', '\1', 'g')
let pid = ''
......@@ -250,6 +259,9 @@ function! sw#server#disconnect_buffer(...)
if a:0
let channel = a:1
endif
if channel == ''
return
endif
if (!s:nvim && ch_status(channel) == 'open') || s:nvim
try
call sw#server#execute_sql('exit', channel)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册