Save bookmarks before exiting

This commit is contained in:
Kien N 2012-04-16 11:41:26 +07:00
parent 93414deb65
commit b3d9e480c8

View File

@ -98,11 +98,11 @@ fu! ctrlp#bookmarkdir#init()
endf endf
fu! ctrlp#bookmarkdir#accept(mode, str) fu! ctrlp#bookmarkdir#accept(mode, str)
let parts = s:parts(s:modify(a:str, ':p'))
cal call('s:savebookmark', parts)
if a:mode =~ 't\|v\|h' if a:mode =~ 't\|v\|h'
cal ctrlp#exit() cal ctrlp#exit()
en en
let parts = s:parts(s:modify(a:str, ':p'))
cal call('s:savebookmark', parts)
cal ctrlp#setdir(parts[1], a:mode =~ 't\|h' ? 'chd!' : 'lc!') cal ctrlp#setdir(parts[1], a:mode =~ 't\|h' ? 'chd!' : 'lc!')
if a:mode == 'e' if a:mode == 'e'
cal ctrlp#switchtype(0) cal ctrlp#switchtype(0)