set imdisable nomousefocus
This commit is contained in:
parent
8048e5220b
commit
3dfb4b444c
@ -100,7 +100,8 @@ fu! s:opts()
|
|||||||
" Global options
|
" Global options
|
||||||
let s:glbs = { 'magic': 1, 'to': 1, 'tm': 0, 'sb': 1, 'hls': 0, 'im': 0,
|
let s:glbs = { 'magic': 1, 'to': 1, 'tm': 0, 'sb': 1, 'hls': 0, 'im': 0,
|
||||||
\ 'report': 9999, 'sc': 0, 'ss': 0, 'siso': 0, 'mfd': 200, 'mouse': 'n',
|
\ 'report': 9999, 'sc': 0, 'ss': 0, 'siso': 0, 'mfd': 200, 'mouse': 'n',
|
||||||
\ 'gcr': 'a:blinkon0', 'ic': 1, 'scs': 1, 'lmap': '' }
|
\ 'gcr': 'a:blinkon0', 'ic': 1, 'scs': 1, 'lmap': '', 'mousef': 0,
|
||||||
|
\ 'imd': 1 }
|
||||||
if s:lazy
|
if s:lazy
|
||||||
cal extend(s:glbs, { 'ut': ( s:lazy > 1 ? s:lazy : 250 ) })
|
cal extend(s:glbs, { 'ut': ( s:lazy > 1 ? s:lazy : 250 ) })
|
||||||
en
|
en
|
||||||
@ -158,10 +159,7 @@ let s:hlgrps = {
|
|||||||
\ }
|
\ }
|
||||||
" * Open & Close {{{1
|
" * Open & Close {{{1
|
||||||
fu! s:Open()
|
fu! s:Open()
|
||||||
if exists('g:ctrlp_log') && g:ctrlp_log
|
cal s:log(1)
|
||||||
let cadir = ctrlp#utils#cachedir()
|
|
||||||
sil! exe 'redi! >' cadir.s:lash(cadir).'ctrlp.log'
|
|
||||||
en
|
|
||||||
cal s:getenv()
|
cal s:getenv()
|
||||||
sil! exe 'noa keepa' ( s:mwbottom ? 'bo' : 'to' ) '1new ControlP'
|
sil! exe 'noa keepa' ( s:mwbottom ? 'bo' : 'to' ) '1new ControlP'
|
||||||
let [s:bufnr, s:prompt, s:winw] = [bufnr('%'), ['', '', ''], winwidth(0)]
|
let [s:bufnr, s:prompt, s:winw] = [bufnr('%'), ['', '', ''], winwidth(0)]
|
||||||
@ -170,9 +168,9 @@ fu! s:Open()
|
|||||||
let hst = filereadable(s:gethistloc()[1]) ? s:gethistdata() : ['']
|
let hst = filereadable(s:gethistloc()[1]) ? s:gethistdata() : ['']
|
||||||
let s:hstry = empty(hst) || !s:maxhst ? [''] : hst
|
let s:hstry = empty(hst) || !s:maxhst ? [''] : hst
|
||||||
en
|
en
|
||||||
for [ke, va] in items(s:glbs)
|
for [ke, va] in items(s:glbs) | if exists('+'.ke)
|
||||||
sil! exe 'let s:glb_'.ke.' = &'.ke.' | let &'.ke.' = '.string(va)
|
sil! exe 'let s:glb_'.ke.' = &'.ke.' | let &'.ke.' = '.string(va)
|
||||||
endfo
|
en | endfo
|
||||||
if s:opmul != '0' && has('signs')
|
if s:opmul != '0' && has('signs')
|
||||||
sign define ctrlpmark text=+> texthl=Search
|
sign define ctrlpmark text=+> texthl=Search
|
||||||
en
|
en
|
||||||
@ -183,9 +181,9 @@ fu! s:Close()
|
|||||||
try | noa bun!
|
try | noa bun!
|
||||||
cat | noa clo! | endt
|
cat | noa clo! | endt
|
||||||
cal s:unmarksigns()
|
cal s:unmarksigns()
|
||||||
for key in keys(s:glbs)
|
for key in keys(s:glbs) | if exists('+'.key)
|
||||||
sil! exe 'let &'.key.' = s:glb_'.key
|
sil! exe 'let &'.key.' = s:glb_'.key
|
||||||
endfo
|
en | endfo
|
||||||
if exists('s:glb_acd') | let &acd = s:glb_acd | en
|
if exists('s:glb_acd') | let &acd = s:glb_acd | en
|
||||||
let [g:ctrlp_lines, g:ctrlp_allfiles] = [[], []]
|
let [g:ctrlp_lines, g:ctrlp_allfiles] = [[], []]
|
||||||
if s:winres[1] >= &lines && s:winres[2] == winnr('$')
|
if s:winres[1] >= &lines && s:winres[2] == winnr('$')
|
||||||
@ -195,9 +193,7 @@ fu! s:Close()
|
|||||||
\ s:winh g:ctrlp_nolimit
|
\ s:winh g:ctrlp_nolimit
|
||||||
cal ctrlp#recordhist()
|
cal ctrlp#recordhist()
|
||||||
cal s:onexit()
|
cal s:onexit()
|
||||||
if exists('g:ctrlp_log') && g:ctrlp_log
|
cal s:log(0)
|
||||||
sil! redi END
|
|
||||||
en
|
|
||||||
ec
|
ec
|
||||||
endf
|
endf
|
||||||
" * Clear caches {{{1
|
" * Clear caches {{{1
|
||||||
@ -900,8 +896,7 @@ fu! s:OpenMulti()
|
|||||||
cal s:openfile(cmd, va, tail) | sil! hid clo!
|
cal s:openfile(cmd, va, tail) | sil! hid clo!
|
||||||
en | en
|
en | en
|
||||||
el
|
el
|
||||||
let fid = useb ? bufnr : va
|
cal s:openfile(cmd, useb ? bufnr : va, tail) | let ic += 1
|
||||||
cal s:openfile(cmd, fid, tail) | let ic += 1
|
|
||||||
en
|
en
|
||||||
endfo
|
endfo
|
||||||
let &swb = swb
|
let &swb = swb
|
||||||
@ -1353,6 +1348,15 @@ fu! s:argmaps(md, ...)
|
|||||||
retu a:md
|
retu a:md
|
||||||
endf
|
endf
|
||||||
" Misc {{{2
|
" Misc {{{2
|
||||||
|
fu! s:log(m)
|
||||||
|
if exists('g:ctrlp_log') && g:ctrlp_log | if a:m
|
||||||
|
let cadir = ctrlp#utils#cachedir()
|
||||||
|
sil! exe 'redi! >' cadir.s:lash(cadir).'ctrlp.log'
|
||||||
|
el
|
||||||
|
sil! redi END
|
||||||
|
en | en
|
||||||
|
endf
|
||||||
|
|
||||||
fu! s:strwidth(str)
|
fu! s:strwidth(str)
|
||||||
retu exists('*strdisplaywidth') ? strdisplaywidth(a:str) : strlen(a:str)
|
retu exists('*strdisplaywidth') ? strdisplaywidth(a:str) : strlen(a:str)
|
||||||
endf
|
endf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user