Increase stopline tolerance (fixes #386)
This commit is contained in:
parent
2fd1383164
commit
cc08da3f9e
@ -407,9 +407,9 @@ function! s:get_delim(direction, type, side) " {{{1
|
||||
"
|
||||
let l:re = s:re[a:type][a:side]
|
||||
let [l:lnum, l:cnum] = a:direction ==# 'next'
|
||||
\ ? searchpos(l:re, 'cnW', line('w$'))
|
||||
\ ? searchpos(l:re, 'cnW', line('w$') + 200)
|
||||
\ : a:direction ==# 'prev'
|
||||
\ ? searchpos(l:re, 'bcnW', line('w0'))
|
||||
\ ? searchpos(l:re, 'bcnW', max([line('w0') - 200, 1]))
|
||||
\ : searchpos(l:re, 'bcnW', line('.'))
|
||||
let l:match = matchstr(getline(l:lnum), '^' . l:re, l:cnum-1)
|
||||
|
||||
@ -625,8 +625,8 @@ endfunction
|
||||
|
||||
function! s:get_matching_env() dict " {{{1
|
||||
let [re, flags, stopline] = self.is_open
|
||||
\ ? [self.re.close, 'nW', line('w$')]
|
||||
\ : [self.re.open, 'bnW', line('w0')]
|
||||
\ ? [self.re.close, 'nW', line('w$') + 200]
|
||||
\ : [self.re.open, 'bnW', max([line('w0') - 200, 1])]
|
||||
|
||||
let [lnum, cnum] = searchpairpos(self.re.open, '', self.re.close,
|
||||
\ flags, '', stopline)
|
||||
@ -638,8 +638,8 @@ endfunction
|
||||
" }}}1
|
||||
function! s:get_matching_tex() dict " {{{1
|
||||
let [re, flags, stopline] = self.is_open
|
||||
\ ? [self.re.open, 'nW', line('w$')]
|
||||
\ : [self.re.open, 'bnW', line('w0')]
|
||||
\ ? [self.re.open, 'nW', line('w$') + 200]
|
||||
\ : [self.re.open, 'bnW', max([line('w0') - 200, 1])]
|
||||
|
||||
let [lnum, cnum] = searchpos(re, flags, stopline)
|
||||
let match = matchstr(getline(lnum), '^' . re, cnum-1)
|
||||
@ -650,8 +650,8 @@ endfunction
|
||||
" }}}1
|
||||
function! s:get_matching_latex() dict " {{{1
|
||||
let [re, flags, stopline] = self.is_open
|
||||
\ ? [self.re.close, 'nW', line('w$')]
|
||||
\ : [self.re.open, 'bnW', line('w0')]
|
||||
\ ? [self.re.close, 'nW', line('w$') + 200]
|
||||
\ : [self.re.open, 'bnW', max([line('w0') - 200, 1])]
|
||||
|
||||
let [lnum, cnum] = searchpos(re, flags, stopline)
|
||||
let match = matchstr(getline(lnum), '^' . re, cnum-1)
|
||||
@ -662,8 +662,8 @@ endfunction
|
||||
" }}}1
|
||||
function! s:get_matching_delim() dict " {{{1
|
||||
let [re, flags, stopline] = self.is_open
|
||||
\ ? [self.re.close, 'nW', line('w$')]
|
||||
\ : [self.re.open, 'bnW', line('w0')]
|
||||
\ ? [self.re.close, 'nW', line('w$') + 200]
|
||||
\ : [self.re.open, 'bnW', max([line('w0') - 200, 1])]
|
||||
|
||||
let [lnum, cnum] = searchpairpos(self.re.open, '', self.re.close,
|
||||
\ flags, '', stopline)
|
||||
|
Loading…
Reference in New Issue
Block a user