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 From cdacc12ce305ad2f3e65e2a01328a988e3200b51 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 30 Jun 2022 09:55:53 +0000 Subject: Add support for OSC 8 hyperlinks (a VTE extension now supported by other terminals such as iTerm2). Originally written by me then extended and completed by first Will Noble and later Jeff Chiang. GitHub issues 911, 2621, 2890, 3240. --- 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 a3e84c46..04a88172 100644 --- a/cmd-capture-pane.c +++ b/cmd-capture-pane.c @@ -53,8 +53,8 @@ const struct cmd_entry cmd_clear_history_entry = { .name = "clear-history", .alias = "clearhist", - .args = { "t:", 0, 0, NULL }, - .usage = CMD_TARGET_PANE_USAGE, + .args = { "Ht:", 0, 0, NULL }, + .usage = "[-H] " CMD_TARGET_PANE_USAGE, .target = { 't', CMD_FIND_PANE, 0 }, @@ -204,6 +204,8 @@ cmd_capture_pane_exec(struct cmd *self, struct cmdq_item *item) if (cmd_get_entry(self) == &cmd_clear_history_entry) { window_pane_reset_mode_all(wp); grid_clear_history(wp->base.grid); + if (args_has(args, 'H')) + screen_reset_hyperlinks(wp->screen); return (CMD_RETURN_NORMAL); } -- cgit From d0d2c39decd1c342f2ffdb360e5d6b509b9bb34e Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 6 Jul 2022 07:36:36 +0000 Subject: Support hyperlinks with capture-pane -e and add a mouse_hyperlink format, GitHub issue 3247 from Jeff Chiang. --- cmd-capture-pane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-capture-pane.c') diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c index 04a88172..422f87d6 100644 --- a/cmd-capture-pane.c +++ b/cmd-capture-pane.c @@ -177,7 +177,7 @@ cmd_capture_pane_history(struct args *args, struct cmdq_item *item, buf = NULL; for (i = top; i <= bottom; i++) { line = grid_string_cells(gd, 0, i, sx, &gc, with_codes, - escape_c0, !join_lines && !no_trim); + escape_c0, !join_lines && !no_trim, wp->screen); linelen = strlen(line); buf = cmd_capture_pane_append(buf, len, line, linelen); -- cgit