nixprime / cpsm

A CtrlP matcher, specialized for paths.
Apache License 2.0
202 stars 19 forks source link

CtrlPMRUFiles shows 'ERROR: Failed to evaluate expression' #37

Open dsummersl opened 7 years ago

dsummersl commented 7 years ago

I tried the instructions in https://github.com/nixprime/cpsm#options to setup the builtin CtrlPMRUFiles in neovim:

let g:ctrlp_map = ''
nnoremap <silent> <C-o> :let g:cpsm_match_empty_query = 0<CR>:CtrlPMRUFiles<CR>
nnoremap <silent> <c-p> :let g:cpsm_match_empty_query = 1<CR>:CtrlP<CR>

When I start neovim and issue <C-o> I see the error ERROR: Failed to evaluate expression. However, when I start neovim and issue <C-p> followed by <C-o> I don't get any error (but the list presented doesn't show any MRU entries that I can detect).

I'm not sure even how to debug this - any suggestions?

dsummersl commented 7 years ago

A solution I'm using at the moment: turn off cpsm for MRU:

let g:ctrlp_map = ''
nnoremap <silent> <c-p> :unlet! g:ctrlp_match_func<CR>:CtrlPMRUFiles<CR>
nnoremap <silent> <c-o> :let g:ctrlp_match_func = {'match': 'cpsm#CtrlPMatch'}<CR>:CtrlP<cr>
nixprime commented 6 years ago

I can't reproduce this on the most recent neovim package on Ubuntu 16.04 ("0.2.1-dev"). Can you update to the latest version of cpsm, run "nvim -V9log", invoke CtrlPMRU with cpsm, and then find the traceback in the generated "log" file?