diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-30 10:44:15 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-30 10:44:15 -0500 |
commit | 589fdfa4a1cc63c08451893df393b9ac0c7c52ed (patch) | |
tree | a913a30eb6a4773d0b214c852d32c1ecdec379c9 | |
parent | 0d0e338c43905c1fc1fff0f095b2fe32aa3eb3b2 (diff) | |
download | vim-textobj-589fdfa4a1cc63c08451893df393b9ac0c7c52ed.tar.gz vim-textobj-589fdfa4a1cc63c08451893df393b9ac0c7c52ed.zip |
make function argument text object not fail quite as badly with newlines... still not great
-rw-r--r-- | vimrc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -455,11 +455,11 @@ function Textobj_arg(inner, count) let startline = getline(argstartline) if endline[argend] == ')' && startline[argbegin - 2] != '(' let argbegin = match(strpart(startline, 0, argbegin - 1), '\s*$') - if argbegin == 0 + while argbegin == 0 let argstartline -= 1 let startline = getline(argstartline) let argbegin = strlen(startline) - endif + endwhile elseif endline[argend] != ')' let argend += matchend(strpart(endline, argend + 1), '^\s*') + 1 endif |