mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-22 08:45:42 +08:00
parent
4c8bb2272d
commit
c94e6613b3
@ -21,6 +21,7 @@ function! s:self.warp(argv, opts) abort
|
|||||||
let obj = {}
|
let obj = {}
|
||||||
let obj._argv = a:argv
|
let obj._argv = a:argv
|
||||||
let obj._opts = a:opts
|
let obj._opts = a:opts
|
||||||
|
let obj.in_io = get(a:opts, 'in_io', 'pipe')
|
||||||
" @vimlint(EVL103, 1, a:job_id)
|
" @vimlint(EVL103, 1, a:job_id)
|
||||||
function! obj._out_cb(job_id, data) abort
|
function! obj._out_cb(job_id, data) abort
|
||||||
if has_key(self._opts, 'on_stdout')
|
if has_key(self._opts, 'on_stdout')
|
||||||
@ -45,6 +46,7 @@ function! s:self.warp(argv, opts) abort
|
|||||||
\ 'argv': a:argv,
|
\ 'argv': a:argv,
|
||||||
\ 'opts': {
|
\ 'opts': {
|
||||||
\ 'mode': 'nl',
|
\ 'mode': 'nl',
|
||||||
|
\ 'in_io' : obj.in_io,
|
||||||
\ 'out_cb': obj._out_cb,
|
\ 'out_cb': obj._out_cb,
|
||||||
\ 'err_cb': obj._err_cb,
|
\ 'err_cb': obj._err_cb,
|
||||||
\ 'exit_cb': obj._exit_cb,
|
\ 'exit_cb': obj._exit_cb,
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
|
let s:JOB = SpaceVim#api#import('job')
|
||||||
|
|
||||||
let s:rst = []
|
let s:rst = []
|
||||||
|
|
||||||
function! SpaceVim#plugins#searcher#find(expr, exe)
|
function! SpaceVim#plugins#searcher#find(expr, exe)
|
||||||
if empty(a:expr)
|
if empty(a:expr)
|
||||||
let expr = input('search expr: ')
|
let expr = input('search expr: ')
|
||||||
else
|
else
|
||||||
let expr = a:expr
|
let expr = a:expr
|
||||||
endif
|
endif
|
||||||
call jobstart(s:get_search_cmd(a:exe, expr), {
|
call s:JOB.start(s:get_search_cmd(a:exe, expr), {
|
||||||
\ 'on_stdout' : function('s:search_stdout'),
|
\ 'on_stdout' : function('s:search_stdout'),
|
||||||
|
\ 'in_io' : 'null',
|
||||||
\ 'on_exit' : function('s:search_exit'),
|
\ 'on_exit' : function('s:search_exit'),
|
||||||
\ })
|
\ })
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user