Skip to content

Commit

Permalink
fix justinmk#139: ct<esc> should return to previous mode
Browse files Browse the repository at this point in the history
- also works with i_CTRL-O
  • Loading branch information
justinmk committed Apr 23, 2015
1 parent fe77f80 commit a09bff2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/sneak.vim
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ endf
" inclusive: 0 => like t, 1 => like f, 2 => like /
func! sneak#to(op, input, inputlen, count, repeatmotion, reverse, inclusive, streak) abort "{{{
if empty(a:input) "user canceled
if a:op ==# 'c' " user <esc> during change-operation should return to previous mode.
call feedkeys((col('.') > 1 && col('.') < col('$') ? "\<RIGHT>" : '') . "\<C-\>\<C-G>", 'n')
endif
redraw | echo '' | return
endif

Expand Down

0 comments on commit a09bff2

Please sign in to comment.