Skip to content

Commit

Permalink
Reset s:old_cursor_position in CompleteDone autoevent
Browse files Browse the repository at this point in the history
This fixes `<C-x><C-u>` after closing the pum, without the cursor being
moved.
  • Loading branch information
blueyed committed Jan 25, 2015
1 parent d1177f3 commit 3d035e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autoload/youcompleteme.vim
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ endfunction
function! youcompleteme#EnableCursorMovedAutocommands()
augroup ycmcompletemecursormove
autocmd!
" When completion is done, reset the old cursor position, e.g. after
" <C-w>. Otherwise <c-x><c-u> aborts because of !s:cursor_moved.
autocmd CompleteDone * let s:old_cursor_position = []
autocmd CursorMovedI * call s:OnCursorMovedInsertMode()
autocmd CursorMoved * call s:OnCursorMovedNormalMode()
augroup END
Expand Down

0 comments on commit 3d035e9

Please sign in to comment.