Match the inner brace scope when on an opening bracket

Fixes #3.
This commit is contained in:
Eric T. Johnson 2023-09-22 13:17:58 -04:00 committed by GitHub
parent feaba6b8b6
commit 1a4a2d4c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ endfunction
function! argwrap#findRange(braces)
let l:filter = 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"'
let [l:lineStart, l:colStart] = searchpairpos(a:braces[0], '', a:braces[1], 'Wnb', filter)
let [l:lineStart, l:colStart] = searchpairpos(a:braces[0], '', a:braces[1], 'Wcnb', filter)
let [l:lineEnd, l:colEnd] = searchpairpos(a:braces[0], '', a:braces[1], 'Wcn', filter)
return {'lineStart': l:lineStart, 'colStart': l:colStart, 'lineEnd': l:lineEnd, 'colEnd': l:colEnd}
endfunction