summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authornicm <nicm>2022-05-30 13:00:18 +0000
committernicm <nicm>2022-05-30 13:00:18 +0000
commitcd89000c1d75d0cfec28cf7e81b06f80a43ea093 (patch)
tree3d7fa0df54cb6f87fa5f53a35a86ebe623f278cc /input.c
parent20b0b38cf47112c0219b5bd041d61c5a28fae0fd (diff)
Add a way for lines added to copy mode to be passed through the parser
to handle escape sequences and use it for run-shell, GitHub issue 3156.
Diffstat (limited to 'input.c')
-rw-r--r--input.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/input.c b/input.c
index b1856538..693b6f32 100644
--- a/input.c
+++ b/input.c
@@ -1078,6 +1078,9 @@ input_reply(struct input_ctx *ictx, const char *fmt, ...)
va_list ap;
char *reply;
+ if (bev == NULL)
+ return;
+
va_start(ap, fmt);
xvasprintf(&reply, fmt, ap);
va_end(ap);
@@ -1798,6 +1801,8 @@ input_csi_dispatch_sm_private(struct input_ctx *ictx)
screen_write_mode_set(sctx, MODE_FOCUSON);
if (wp == NULL)
break;
+ if (!options_get_number(global_options, "focus-events"))
+ break;
if (wp->flags & PANE_FOCUSED)
bufferevent_write(wp->event, "\033[I", 3);
else