Skip to content

Commit 5aeab2a

Browse files
committed
export g:ctrlp_formatline_func to customize format per line
for example, this will be usefull for the external plugin that use CtrlP like vim-devicons.
1 parent e4b0a4f commit 5aeab2a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

autoload/ctrlp.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ let [s:pref, s:bpref, s:opts, s:new_opts, s:lc_opts] =
9797
\ 'compare_lim': ['s:compare_lim', 3000],
9898
\ 'bufname_mod': ['s:bufname_mod', ':t'],
9999
\ 'bufpath_mod': ['s:bufpath_mod', ':~:.:h'],
100+
\ 'formatline_func': ['s:flfunc', 's:formatline(v:val)'],
100101
\ }, {
101102
\ 'open_multiple_files': 's:opmul',
102103
\ 'regexp': 's:regexp',
@@ -624,7 +625,7 @@ fu! s:Render(lines, pat)
624625
en
625626
if s:mw_order == 'btt' | cal reverse(lines) | en
626627
let s:lines = copy(lines)
627-
cal map(lines, 's:formatline(v:val)')
628+
cal map(lines, s:flfunc)
628629
cal setline(1, s:offset(lines, height))
629630
cal s:unmarksigns()
630631
cal s:remarksigns()

0 commit comments

Comments
 (0)