Use stopline in highlight_surround (re #118)

This commit is contained in:
Andy K. Massimino
2021-02-27 11:40:54 -05:00
parent 000f973983
commit 69208b0801
2 changed files with 2 additions and 1 deletions

View File

@@ -174,6 +174,7 @@ function! matchup#delim#get_surrounding_impl(type, ...) " {{{1
if get(l:opts, 'check_skip', 0)
let l:delimopts.check_skip = 1
endif
let l:delimopts.stopline = get(l:opts, 'stopline', s:stopline)
" keep track of the outermost pair found so far
" returned when g:matchup_delim_count_fail = 1

View File

@@ -715,7 +715,7 @@ endfunction
" }}}1
function! s:highlight_surrounding(...) " {{{1
let l:opts = { 'local': 0, 'matches': [] }
let l:opts = {'local': 0, 'matches': [], 'stopline': 2*winheight(0)}
let l:delims = matchup#delim#get_surrounding('delim_all', 1, l:opts)
let l:open = l:delims[0]
if empty(l:open) | return | endif