Skip to content

Commit 1dd3475

Browse files
committed
Initialize the MRU plugin only when needed
There's no point in tracking the files if the MRU plugin has been explicitly disabled.
1 parent cbd52e3 commit 1dd3475

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/ctrlp.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ if g:ctrlp_map != '' && !hasmapto('<plug>(ctrlp)')
3939
exe 'map' g:ctrlp_map '<plug>(ctrlp)'
4040
en
4141

42-
cal ctrlp#mrufiles#init()
42+
if index(g:ctrlp_types, 'mru') >= 0
43+
cal ctrlp#mrufiles#init()
44+
en
4345

4446
com! -bar CtrlPTag cal ctrlp#init(ctrlp#tag#id())
4547
com! -bar CtrlPQuickfix cal ctrlp#init(ctrlp#quickfix#id())

0 commit comments

Comments
 (0)