Fixed problem with dsc (#215)

This commit is contained in:
Karl Yngve Lervåg 2015-10-20 23:24:51 +02:00
parent 10348d6d4f
commit 3cd8770057
2 changed files with 3 additions and 2 deletions

View File

@ -141,7 +141,7 @@ syntax match texMinted '\\begin{minted}\_[^}]\{-}{\w\+}'
\ contains=texBeginEnd,texMintedName \ contains=texBeginEnd,texMintedName
syntax match texMinted '\\end{minted}' syntax match texMinted '\\end{minted}'
\ contains=texBeginEnd \ contains=texBeginEnd
syntax match texMintedName '{\w\+}' syntax match texMintedName '{\w\+}' contained
highlight link texMintedName texBeginEndName highlight link texMintedName texBeginEndName

View File

@ -68,6 +68,7 @@ function! vimtex#change#get_command(...) " {{{1
let l:c = matchstr(l:line, '\\\zs\w\+', l:p[1]-1) let l:c = matchstr(l:line, '\\\zs\w\+', l:p[1]-1)
return [l:c] + l:p return [l:c] + l:p
elseif l:syntax ==# 'texMatcher' elseif l:syntax ==# 'texMatcher'
\ || l:syntax ==# 'texRefZone'
\ || (l:syntax ==# 'Delimiter' && l:char =~# '{\|}') \ || (l:syntax ==# 'Delimiter' && l:char =~# '{\|}')
let l:curpos = getcurpos() let l:curpos = getcurpos()
keepjumps normal! vaBoh keepjumps normal! vaBoh
@ -137,7 +138,7 @@ function! vimtex#change#command_delete() " {{{1
" Delete surrounding braces if present " Delete surrounding braces if present
if getline('.')[l:col-1 :] =~# '^\s*{' if getline('.')[l:col-1 :] =~# '^\s*{'
call searchpos('{', 'c') call searchpos('{', 'c')
keepjumps normal! vaBmzoxg`zx keepjumps normal! vaBomzoxg`zx
if l:line == l:curpos[1] if l:line == l:curpos[1]
let l:curpos[2] -= 1 let l:curpos[2] -= 1
if l:curpos[2] < 0 if l:curpos[2] < 0