Fix cpp on closing bracket

Closes #122.
This commit is contained in:
Tim Pope 2014-01-09 14:32:16 -05:00
parent 52758fd4ea
commit 28a6c2c262

View File

@ -688,6 +688,10 @@ function! s:Eval(bang, line1, line2, count, args) abort
let close = '[]})]' let close = '[]})]'
let [line1, col1] = searchpairpos(open, '', close, 'bcrn', g:fireplace#skip) let [line1, col1] = searchpairpos(open, '', close, 'bcrn', g:fireplace#skip)
let [line2, col2] = searchpairpos(open, '', close, 'rn', g:fireplace#skip) let [line2, col2] = searchpairpos(open, '', close, 'rn', g:fireplace#skip)
if !line1 && !line2
let [line1, col1] = searchpairpos(open, '', close, 'brn', g:fireplace#skip)
let [line2, col2] = searchpairpos(open, '', close, 'crn', g:fireplace#skip)
endif
while col1 > 1 && getline(line1)[col1-2] =~# '[#''`~@]' while col1 > 1 && getline(line1)[col1-2] =~# '[#''`~@]'
let col1 -= 1 let col1 -= 1
endwhile endwhile