Skip to content

Commit 65adcf7

Browse files
authored
Merge pull request #10 from hiberabyss/master
If using g:ctrlp_cmdpalette_execute=1, enter input mode when press ctrl-[xvt]
2 parents 79db2a3 + 6496515 commit 65adcf7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autoload/ctrlp/cmdpalette.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,14 @@ endfunction
9898
func! ctrlp#cmdpalette#accept(mode, str)
9999
call ctrlp#exit()
100100
redraw
101+
let g:ctrlp_open_mode = a:mode
102+
let g:ctrlp_open_cmd = a:str
101103
call feedkeys(':', 'n')
102104
call feedkeys(split(a:str, '\t')[0], 'n')
103-
if g:ctrlp_cmdpalette_execute == 1
105+
if a:mode == 'e' && g:ctrlp_cmdpalette_execute == 1
104106
call feedkeys("\<CR>", 'n')
107+
else
108+
call feedkeys(" ", 'n')
105109
endif
106110
call remove(s:cmdpalette_commands, index(s:cmdpalette_commands, a:str))
107111
call insert(s:cmdpalette_commands, a:str)

0 commit comments

Comments
 (0)