aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarstrom <john@ankarstrom.se>2021-07-04 01:34:50 +0200
committerJohn Ankarstrom <john@ankarstrom.se>2021-07-04 01:34:50 +0200
commit9513e69a9ff0046c9e12210dbde7b930f8c8fdec (patch)
tree9b6c58491530b136070da17f8b26a53b7383c4a7
parent55b517b1d2321fff34b26659622147a3e38188d6 (diff)
downloaddwim-9513e69a9ff0046c9e12210dbde7b930f8c8fdec.tar.gz
Call chdir in function(call handler
-rwxr-xr-xdwim2
1 files changed, 1 insertions, 1 deletions
diff --git a/dwim b/dwim
index fee70ca..4df82f5 100755
--- a/dwim
+++ b/dwim
@@ -72,7 +72,7 @@ for ($phrase) {
my $dir = dir;
s/\(.*/(/;
for (`grep -n '^$_' "$dir"/*.c "$dir"/*.h`) {
- run @EDITOR, "+$2", $1 if /([^:]+):(\d+):/;
+ run @EDITOR, "+$2", path($1) if /([^:]+):(\d+):/;
}
fail 'could not find definition';
# FALLTHROUGH