From c07d582e2476db075252998388305f11302a8b23 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 7 Jun 2022 10:02:19 +0000 Subject: Expand arguments to some commands where it makes sense, GitHub issue 3204 from Anindya Mukherjee. --- cmd-capture-pane.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cmd-capture-pane.c') diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c index 964f831e..a3e84c46 100644 --- a/cmd-capture-pane.c +++ b/cmd-capture-pane.c @@ -133,7 +133,8 @@ cmd_capture_pane_history(struct args *args, struct cmdq_item *item, if (Sflag != NULL && strcmp(Sflag, "-") == 0) top = 0; else { - n = args_strtonum(args, 'S', INT_MIN, SHRT_MAX, &cause); + n = args_strtonum_and_expand(args, 'S', INT_MIN, SHRT_MAX, + item, &cause); if (cause != NULL) { top = gd->hsize; free(cause); @@ -149,7 +150,8 @@ cmd_capture_pane_history(struct args *args, struct cmdq_item *item, if (Eflag != NULL && strcmp(Eflag, "-") == 0) bottom = gd->hsize + gd->sy - 1; else { - n = args_strtonum(args, 'E', INT_MIN, SHRT_MAX, &cause); + n = args_strtonum_and_expand(args, 'E', INT_MIN, SHRT_MAX, + item, &cause); if (cause != NULL) { bottom = gd->hsize + gd->sy - 1; free(cause); -- cgit v1.2.3