Handling case where we cannot find args to wrap better

This commit is contained in:
Alex Yatskov 2014-12-01 20:30:37 +09:00
parent 84c43333b5
commit 7f2533591b

View File

@ -121,7 +121,7 @@ endfunction
function! argwrap#toggle()
let l:range = argwrap#findRange()
if l:range.lineStart == l:range.lineEnd && l:range.colStart == l:range.colEnd
if l:range.lineStart == 0 && l:range.colStart == 0 || l:range.lineEnd == 0 && l:range.colEnd == 0
return
endif