chrisbra / matchit

The matchit plugin from Vim
61 stars 9 forks source link

`Matchit` malfunctions under specific conditions. #40

Open gen740 opened 8 months ago

gen740 commented 8 months ago

Steps to reproduce

Expected behavior

Selected the region enclosed by ().

chrisbra commented 8 months ago

Hm, it runs into this condition here, which breaks it:

https://github.com/chrisbra/matchit/blob/5428ebbc670ef3c73c74a94faad109d76a091e66/plugin/matchit.vim#L53

I have no idea why this was added initially.

If you use this mapping:

xnoremap <silent> <Plug>(MatchitVisualForward)     :<C-U>call matchit#Match_wrapper('',1,'v')<CR>m'gv``

it seems to work. But it probably breaks at another place then.