Add timeout check to get_surrounding

This commit is contained in:
Andy K. Massimino
2018-04-02 09:25:00 -04:00
parent 1249993d55
commit d9c098049f

View File

@@ -186,6 +186,10 @@ function! matchup#delim#get_surrounding(type, ...) " {{{1
\ l:local ? 'open_mid' : 'open', l:delimopts)
if empty(l:open) | break | endif
if matchup#perf#timeout_check() && !g:matchup_delim_count_fail
break
endif
let l:matches = matchup#delim#get_matching(l:open, 1)
if len(l:matches)