mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-17 17:38:01 +00:00
Cleanup
This commit is contained in:
@@ -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']`
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user