mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Use stopline in highlight_surround (re #118)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user