aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sam.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sam.c b/sam.c
index c25bf4f..19894bf 100644
--- a/sam.c
+++ b/sam.c
@@ -1519,8 +1519,10 @@ static bool cmd_files(Vis *vis, Win *win, Command *cmd, const char *argv[], Curs
continue;
bool match = !cmd->regex || (win->file->name &&
text_regex_match(cmd->regex, win->file->name, 0));
- if (match ^ (argv[0][0] == 'Y'))
- ret &= sam_execute(vis, win, cmd->cmd, NULL, NULL);
+ if (match ^ (argv[0][0] == 'Y')) {
+ Filerange def = text_range_new(0, 0);
+ ret &= sam_execute(vis, win, cmd->cmd, NULL, &def);
+ }
}
return ret;
}