This commit is contained in:
Andy K. Massimino
2021-04-14 21:23:06 -04:00
parent 58c55eb721
commit 1d2ba4dfa9
3 changed files with 3 additions and 30 deletions

View File

@@ -623,7 +623,7 @@ default: 1
Modify the set of operators which may operate
[line-wise](#line-wise-operatortext-object-combinations)
```vim
let g:matchup_text_obj_linewise_operators' = ['d', 'y']
let g:matchup_text_obj_linewise_operators = ['d', 'y']
```
default: `['d', 'y']`

View File

@@ -1017,33 +1017,6 @@ function! s:add_background_matches_1(line1, col1, line2, col2) " {{{1
\ matchadd('MatchBackground', l:match, l:priority))
endfunction
" }}}1
function! s:add_background_matches_2(line1, col1, line2, col2) " {{{1
if a:line1 == a:line2 && a:col1 > a:col2
return
endif
let l:priority = -1
let l:curline = a:line1
while l:curline <= a:line2
let l:endline = min([l:curline+7, a:line2])
let l:list = range(l:curline, l:endline)
if l:curline == a:line1
let l:list[0] = [a:line1, a:col1,
\ l:curline == a:line2 ? (a:col2-a:col1+1)
\ : strlen(getline(a:line1))]
endif
if l:endline == a:line2 && l:curline != a:line2
let l:list[-1] = [a:line2, 1, a:col2]
endif
call add(w:matchup_match_id_list,
\ matchaddpos('MatchBackground', l:list, l:priority))
let l:curline = l:endline+1
endwhile
endfunction
" }}}1
let &cpo = s:save_cpo

View File

@@ -34,7 +34,7 @@ endfunction
function! matchup#ts_engine#get_delim(opts) abort
call matchup#perf#tic('ts_engine.get_delim')
let l:res = s:forward('get_delim', bufnr(), a:opts)
let l:res = s:forward('get_delim', bufnr('%'), a:opts)
if empty(l:res)
call matchup#perf#toc('ts_engine.get_delim', 'fail')
return {}
@@ -48,7 +48,7 @@ function! matchup#ts_engine#get_delim(opts) abort
endfunction
function! matchup#ts_engine#get_matching(down, _) dict abort
let l:list = s:forward('get_matching', self, a:down, bufnr())
let l:list = s:forward('get_matching', self, a:down, bufnr('%'))
return l:list
endfunction