From bc44c3860e875acb8a2c9b0ec39c54e9196be388 Mon Sep 17 00:00:00 2001 From: davebv Date: Wed, 16 Oct 2013 10:38:24 +0200 Subject: [PATCH] Avoid invalid expression and type mismatch Invalid expression error is produced when trying to open certain tags --- autoload/ctrlp.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index 19ac1463..3fa4c1d2 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -1084,8 +1084,11 @@ fu! s:AcceptSelection(action) let type = exttype == 'dict' ? exttype : 'list' en en - let actargs = type == 'dict' ? [{ 'action': md, 'line': line, 'icr': icr }] - \ : [md, line] + if type ==# 'dict' + let actargs = [{ 'action': md, 'line': line, 'icr': icr }] + el + let actargs = [md, line] + en cal call(actfunc, actargs) endf " - CreateNewFile() {{{1