kien / ctrlp.vim

Fuzzy file, buffer, mru, tag, etc finder.
kien.github.com/ctrlp.vim
7.26k stars 677 forks source link

Allow ctrlp_user_command to not have '%s' in it #779

Open Thr4wn opened 4 years ago

Thr4wn commented 4 years ago

Previously, this command always executed: printf(lscmd, path), and lscmd is set to the value of ctrlp_user_command if that value is set. The problem is that if ctrlp_user_command does not have a %s in it, then printf command receives, as its first parameter, a string that doesn't have %s in it. However, it also receives a second parameter. This causes printf to throw an error saying that there are too many parameters. That error is silently caught (line 351). The net result is that the users experiences the symptom of seeing the message "NO ENTRIES" every time.