Skip to content

Commit

Permalink
Merge pull request #10 from hiberabyss/master
Browse files Browse the repository at this point in the history
If using g:ctrlp_cmdpalette_execute=1, enter input mode when press ctrl-[xvt]
  • Loading branch information
fisadev authored Mar 13, 2018
2 parents 79db2a3 + 6496515 commit 65adcf7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autoload/ctrlp/cmdpalette.vim
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,14 @@ endfunction
func! ctrlp#cmdpalette#accept(mode, str)
call ctrlp#exit()
redraw
let g:ctrlp_open_mode = a:mode
let g:ctrlp_open_cmd = a:str
call feedkeys(':', 'n')
call feedkeys(split(a:str, '\t')[0], 'n')
if g:ctrlp_cmdpalette_execute == 1
if a:mode == 'e' && g:ctrlp_cmdpalette_execute == 1
call feedkeys("\<CR>", 'n')
else
call feedkeys(" ", 'n')
endif
call remove(s:cmdpalette_commands, index(s:cmdpalette_commands, a:str))
call insert(s:cmdpalette_commands, a:str)
Expand Down

0 comments on commit 65adcf7

Please sign in to comment.