diff --git a/autoload/vimtex/change.vim b/autoload/vimtex/change.vim index b84218f..0af135d 100644 --- a/autoload/vimtex/change.vim +++ b/autoload/vimtex/change.vim @@ -70,7 +70,7 @@ function! vimtex#change#get_command(...) " {{{1 elseif l:syntax ==# 'texMatcher' \ || (l:syntax ==# 'Delimiter' && l:char =~# '{\|}') let l:curpos = getcurpos() - normal! vaBoh + keepjumps normal! vaBoh let l:result = vimtex#change#get_command(searchpos('\S', 'bcn')) call setpos('.', l:curpos) return l:result @@ -136,7 +136,8 @@ function! vimtex#change#command_delete() " {{{1 " Delete surrounding braces if present if getline('.')[l:col-1 :] =~# '^\s*{' - normal! f{vaBm`oxg``x + call searchpos('{', 'c') + keepjumps normal! vaBmzoxg`zx if l:line == l:curpos[1] let l:curpos[2] -= 1 if l:curpos[2] < 0