diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-21 02:17:12 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-21 02:17:12 -0500 |
commit | 6a17cc237e4911775162a05b6cb3b89e4171a15b (patch) | |
tree | 500ec2f811df51bd8d1228ab00a46e5fa1ca249e | |
parent | 53d79e72d69c43f3031dbce9892fc4eb4eafad5f (diff) | |
download | vim-foldtext-6a17cc237e4911775162a05b6cb3b89e4171a15b.tar.gz vim-foldtext-6a17cc237e4911775162a05b6cb3b89e4171a15b.zip |
mark functions whose parameter list we can't figure out, since they use shift or @_ in unexpected ways
-rw-r--r-- | vimrc | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -268,6 +268,7 @@ function Perl_foldtext() if !empty(rest_line) let rest_params = split(rest_line[1], ',\s*') let params += rest_params + let linenum += 1 break endif @@ -275,6 +276,7 @@ function Perl_foldtext() let array_line = matchlist(next_line, 'my\s*\(@\w\+\)\s*=\s*@_;') if !empty(array_line) let params += [array_line[1]] + let linenum += 1 break endif @@ -282,6 +284,7 @@ function Perl_foldtext() let hash_line = matchlist(next_line, 'my\s*%\w\+\s*=\s*@_;') if !empty(hash_line) let params += ['paramhash'] + let linenum += 1 break endif @@ -289,6 +292,10 @@ function Perl_foldtext() break endwhile + if join(getline(linenum, v:foldend)) =~ '\%(shift\%(\s*@\)\@!\|@_\)' + let params += ['unknown'] + endif + return Base_foldtext(sub_type . ' ' . matches[2] . \ '(' . join(params, ', ') . ')') endif |