From 4d0108c2832ca062ae18270d3016b6b11eba26b7 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 16 May 2020 15:24:29 +0000 Subject: Add 'e' key in buffer mode to open the buffer in an editor. --- usr.bin/tmux/paste.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'usr.bin/tmux/paste.c') diff --git a/usr.bin/tmux/paste.c b/usr.bin/tmux/paste.c index a6b925b05f0..48cab16721f 100644 --- a/usr.bin/tmux/paste.c +++ b/usr.bin/tmux/paste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paste.c,v 1.40 2019/04/02 09:03:39 nicm Exp $ */ +/* $OpenBSD: paste.c,v 1.41 2020/05/16 15:24:28 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -297,6 +297,15 @@ paste_set(char *data, size_t size, const char *name, char **cause) return (0); } +/* Set paste data without otherwise changing it. */ +void +paste_replace(struct paste_buffer *pb, char *data, size_t size) +{ + free(pb->data); + pb->data = data; + pb->size = size; +} + /* Convert start of buffer into a nice string. */ char * paste_make_sample(struct paste_buffer *pb) -- cgit v1.2.3