diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-19 23:16:52 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-19 23:16:52 +0200 |
commit | c0044f47f9e70067b05894280e2c231a35096bda (patch) | |
tree | f25b10e7c48d15311e7b59477f6317c15824f652 | |
parent | e1293ee10f1d9a845a23bbe127a130c9d1eda3b7 (diff) | |
download | dwim-c0044f47f9e70067b05894280e2c231a35096bda.tar.gz |
Improve function(call handler
-rwxr-xr-x | dwim | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -77,10 +77,11 @@ for ($phrase) { if (/^([A-Za-z_][A-Za-z0-9_]*)\(/) { handle 'function(call'; my $dir = dir; - s/\(.*//; + s/\(.*/(/; for (`grep -n '^$_' "$dir"/*.c "$dir"/*.h`) { run @EDITOR, "+$2", $1 if /([^:]+):(\d+):/; } + fail 'could not find definition'; # FALLTHROUGH } |