Skip to content

Commit

Permalink
Merge pull request #52 from mattn/no-esc-a
Browse files Browse the repository at this point in the history
Don't send <ESC>a, it breaks dot register.
  • Loading branch information
justmao945 committed May 22, 2015
2 parents 13b0b00 + 74a64e2 commit e5e82bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugin/clang.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1012,10 +1012,9 @@ func! s:ClangExecuteDoneTriggerCompletion()
let b:clang_state['state'] = 'sync'
call s:PDebug("ClangExecuteDoneTriggerCompletion::stdout", b:clang_state['stdout'], 3)
call s:PDebug("ClangExecuteDoneTriggerCompletion::stderr", b:clang_state['stderr'], 2)
call feedkeys("\<Esc>a")
" As the default action of <C-x><C-o> causes a 'pattern not found'
" when the result is empty, which break our input, that's really painful...
if ! empty(b:clang_state['stdout'])
if ! empty(b:clang_state['stdout']) && mode() == 'i'
call feedkeys("\<C-x>\<C-o>")
else
call ClangComplete(0, ClangComplete(1, 0))
Expand Down

0 comments on commit e5e82bc

Please sign in to comment.