mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Fix infinite loop in text object
This commit is contained in:
@@ -344,6 +344,8 @@ function! s:get_delim(opts) " {{{1
|
||||
if a:opts.direction !=# 'current'
|
||||
\ && (l:check_skip || l:wordish_skip)
|
||||
\ && matchup#delim#skip(l:lnum, l:cnum)
|
||||
\ && (a:opts.direction ==# 'prev' ? (l:lnum > 1 || l:cnum > 1)
|
||||
\ : (l:lnum < line('$') || l:cnum < len(getline('$'))))
|
||||
|
||||
" invalid match, move cursor and keep looking
|
||||
call matchup#pos#set_cursor(a:opts.direction ==# 'next'
|
||||
|
||||
Reference in New Issue
Block a user