Wrap the terminal API in vimscript layer
This commit is contained in:
parent
d1e3b648d3
commit
ee1bb009ea
5 changed files with 50 additions and 15 deletions
|
|
@ -30,7 +30,7 @@ endfunction
|
|||
function! s:_OnExit( channel, status ) abort
|
||||
echom 'Channel exit with status ' . a:status
|
||||
redraw
|
||||
unlet s:job
|
||||
unlet s:job
|
||||
py3 _vimspector_session.OnServerExit( vim.eval( 'a:status' ) )
|
||||
endfunction
|
||||
|
||||
|
|
|
|||
37
autoload/vimspector/internal/term.vim
Normal file
37
autoload/vimspector/internal/term.vim
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
" vimspector - A multi-language debugging system for Vim
|
||||
" Copyright 2018 Ben Jackson
|
||||
"
|
||||
" Licensed under the Apache License, Version 2.0 (the "License");
|
||||
" you may not use this file except in compliance with the License.
|
||||
" You may obtain a copy of the License at
|
||||
"
|
||||
" http://www.apache.org/licenses/LICENSE-2.0
|
||||
"
|
||||
" Unless required by applicable law or agreed to in writing, software
|
||||
" distributed under the License is distributed on an "AS IS" BASIS,
|
||||
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
" See the License for the specific language governing permissions and
|
||||
" limitations under the License.
|
||||
|
||||
|
||||
" Boilerplate {{{
|
||||
let s:save_cpo = &cpoptions
|
||||
set cpoptions&vim
|
||||
" }}}
|
||||
|
||||
function! vimspector#internal#term#Start( cmd, opts ) abort
|
||||
return term_start( a:cmd, a:opts )
|
||||
endfunction
|
||||
|
||||
function! vimspector#internal#term#IsFinished( bufno ) abort
|
||||
return index( split( term_getstatus( a:bufno ), ',' ), 'finished' ) >= 0
|
||||
endfunction
|
||||
|
||||
function! vimspector#internal#term#GetPID( bufno ) abort
|
||||
return job_info( term_getjob( a:bufno ) ).process
|
||||
endfunction
|
||||
|
||||
" Boilerplate {{{
|
||||
let &cpoptions=s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" }}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue