Silently open files
This commit is contained in:
parent
269a3f1350
commit
4852c3214b
@ -941,6 +941,9 @@ fu! s:OpenMulti()
|
|||||||
let mkd = values(s:marked)
|
let mkd = values(s:marked)
|
||||||
cal s:sanstail(join(s:prompt, ''))
|
cal s:sanstail(join(s:prompt, ''))
|
||||||
cal s:PrtExit()
|
cal s:PrtExit()
|
||||||
|
if !nr || md == 'i'
|
||||||
|
retu map(mkd, "s:openfile('bad', fnamemodify(v:val, ':.'), '')")
|
||||||
|
en
|
||||||
" Move the cursor to a reusable window
|
" Move the cursor to a reusable window
|
||||||
let [tail, fnesc] = [s:tail(), exists('*fnameescape') && v:version > 701]
|
let [tail, fnesc] = [s:tail(), exists('*fnameescape') && v:version > 701]
|
||||||
let [emptytail, nwpt] = [empty(tail), exists('g:ctrlp_open_multiple_files')]
|
let [emptytail, nwpt] = [empty(tail), exists('g:ctrlp_open_multiple_files')]
|
||||||
@ -1436,9 +1439,10 @@ fu! s:sanstail(str)
|
|||||||
endf
|
endf
|
||||||
|
|
||||||
fu! s:argmaps(md, ...)
|
fu! s:argmaps(md, ...)
|
||||||
let str = '[t]ab/[v]ertical/[h]orizontal'.( a:0 ? '/[r]eplace' : '' ).'? '
|
let roh = a:0 ? ['/[r]eplace', 'r'] : ['/h[i]dden', 'i']
|
||||||
|
let str = '[t]ab/[v]ertical/[h]orizontal'.roh[0].'? '
|
||||||
let args = [a:md] + ( a:0 ? [a:1] : [] )
|
let args = [a:md] + ( a:0 ? [a:1] : [] )
|
||||||
retu s:choices(str, ['r', 'h', 't', 'v'], 's:argmaps', args)
|
retu s:choices(str, ['t', 'v', 'h', roh[1]], 's:argmaps', args)
|
||||||
endf
|
endf
|
||||||
|
|
||||||
fu! s:insertstr()
|
fu! s:insertstr()
|
||||||
|
Loading…
Reference in New Issue
Block a user