Fix offset in get_surrounding

This commit is contained in:
Andy K. Massimino
2017-11-29 14:06:39 -05:00
parent ec9f4971b6
commit ebf5a90429
2 changed files with 2 additions and 6 deletions

View File

@@ -205,9 +205,8 @@ function! matchup#delim#get_surrounding(type, ...) " {{{1
if len(l:matches)
let l:close = l:local ? l:open.links.next : l:open.links.close
" XXX need actual column position?
let l:pos_val_try = matchup#pos#val(l:close)
\ + strdisplaywidth(l:close.match) - 1
\ + matchup#delim#end_offset(l:close)
endif
if len(l:matches) && l:pos_val_try >= l:pos_val_cursor

View File

@@ -19,10 +19,7 @@ function! matchup#motion#init_module() " {{{1
\ empty(g:v_motion_force) ? 'v' : g:v_motion_force
" jump between matching pairs
" TODO XXX add "forced" omap: dV% (must make v,V,C-V)
" <silent> XXX
" todo make % vi compatible wrt yank (:h quote_number)
" TODO can % be made vi compatible wrt yank (:h quote_number)?
" the basic motions % and g%
nnoremap <silent> <plug>(matchup-%)