From 8e537d80c1d0b01cc0adc6024fe06f5ad38d098b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Sun, 5 Apr 2015 20:36:41 +0200 Subject: [PATCH] Use robust operators --- autoload/vimtex/motion.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autoload/vimtex/motion.vim b/autoload/vimtex/motion.vim index 94a1c62..126d1cd 100644 --- a/autoload/vimtex/motion.vim +++ b/autoload/vimtex/motion.vim @@ -88,7 +88,7 @@ function! vimtex#motion#find_matching_pair(...) " {{{1 let not_cursor = '\%(\%'. lnum . 'l\%' . cnum . 'c\)\@!' " Finally, find the matching delimiter - if delim =~ '^\$' + if delim =~# '^\$' let inline = s:notcomment . s:notbslash . '\$' let [lnum0, cnum0] = searchpos('.', 'nW') if lnum0 && vimtex#util#has_syntax('texMathZoneX', lnum0, cnum0) @@ -191,7 +191,7 @@ function! vimtex#motion#sel_environment(...) " {{{1 let [env, lnum, cnum, lnum2, cnum2] = vimtex#util#get_env(1) call cursor(lnum, cnum) if inner - if env =~ '^\' + if env =~# '^\' call search('\\.\_\s*\S', 'eW') else call search('}\(\_\s*\(\[\_[^]]*\]\|{\_\S\{-}}\)\)\?\_\s*\S', 'eW') @@ -206,7 +206,7 @@ function! vimtex#motion#sel_environment(...) " {{{1 if inner call search('\S\_\s*', 'bW') else - if env =~ '^\' + if env =~# '^\' normal! l else call search('}', 'eW') @@ -221,7 +221,7 @@ function! vimtex#motion#sel_inline_math(...) " {{{1 if vimtex#util#has_syntax('texMathZoneX') call s:search_and_skip_comments(dollar_pat, 'cbW') - elseif getline('.')[col('.') - 1] == '$' + elseif getline('.')[col('.') - 1] ==# '$' call s:search_and_skip_comments(dollar_pat, 'bW') else return @@ -303,7 +303,7 @@ function! s:highlight_matching_pair(...) " {{{1 return endif - if delim =~ '^\$' + if delim =~# '^\$' " " Match inline math "