Skip to content

Commit a09bff2

Browse files
committed
fix justinmk#139: ct<esc> should return to previous mode
- also works with i_CTRL-O
1 parent fe77f80 commit a09bff2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugin/sneak.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ endf
8383
" inclusive: 0 => like t, 1 => like f, 2 => like /
8484
func! sneak#to(op, input, inputlen, count, repeatmotion, reverse, inclusive, streak) abort "{{{
8585
if empty(a:input) "user canceled
86+
if a:op ==# 'c' " user <esc> during change-operation should return to previous mode.
87+
call feedkeys((col('.') > 1 && col('.') < col('$') ? "\<RIGHT>" : '') . "\<C-\>\<C-G>", 'n')
88+
endif
8689
redraw | echo '' | return
8790
endif
8891

0 commit comments

Comments
 (0)