Merge pull request #32 from yut23/patch-1

Match the inner brace scope when on an opening bracket
This commit is contained in:
Alexei Yatskov 2023-09-23 16:04:48 -07:00 committed by GitHub
commit b532cb6805
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