parent
5bded09b77
commit
91a0dc5fa5
@ -205,6 +205,19 @@ fu! s:syntax()
|
|||||||
sy match CtrlPTabExtra '\zs\t.*\ze$' contains=CtrlPBufName,CtrlPTagKind
|
sy match CtrlPTabExtra '\zs\t.*\ze$' contains=CtrlPBufName,CtrlPTagKind
|
||||||
en
|
en
|
||||||
endf
|
endf
|
||||||
|
|
||||||
|
fu! s:chknearby(pat)
|
||||||
|
if match(getline('.'), a:pat) < 0
|
||||||
|
let [int, forw, maxl] = [1, 1, line('$')]
|
||||||
|
wh !search(a:pat, 'W'.( forw ? '' : 'b' ))
|
||||||
|
if !forw
|
||||||
|
if int > maxl | brea | en
|
||||||
|
let int += int
|
||||||
|
en
|
||||||
|
let forw = !forw
|
||||||
|
endw
|
||||||
|
en
|
||||||
|
endf
|
||||||
" Public {{{1
|
" Public {{{1
|
||||||
fu! ctrlp#buffertag#init(fname)
|
fu! ctrlp#buffertag#init(fname)
|
||||||
let bufs = exists('s:btmode') && s:btmode
|
let bufs = exists('s:btmode') && s:btmode
|
||||||
@ -226,18 +239,8 @@ fu! ctrlp#buffertag#accept(mode, str)
|
|||||||
let bufnr = str2nr(get(vals, 1))
|
let bufnr = str2nr(get(vals, 1))
|
||||||
if bufnr
|
if bufnr
|
||||||
cal ctrlp#acceptfile(a:mode, bufname(bufnr))
|
cal ctrlp#acceptfile(a:mode, bufname(bufnr))
|
||||||
let pat = get(vals, 3, '')
|
|
||||||
exe 'norm!' str2nr(get(vals, 2, line('.'))).'G'
|
exe 'norm!' str2nr(get(vals, 2, line('.'))).'G'
|
||||||
if match(getline('.'), pat) < 0
|
cal s:chknearby('\V\C'.get(vals, 3, ''))
|
||||||
let [int, forw, maxl] = [1, 1, line('$')]
|
|
||||||
wh !search(pat, 'W'.( forw ? '' : 'b' ))
|
|
||||||
if !forw
|
|
||||||
if int > maxl | brea | en
|
|
||||||
let int += int
|
|
||||||
en
|
|
||||||
let forw = !forw
|
|
||||||
endw
|
|
||||||
en
|
|
||||||
sil! norm! zvzz
|
sil! norm! zvzz
|
||||||
en
|
en
|
||||||
endf
|
endf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user