aboutsummaryrefslogtreecommitdiff
path: root/paste.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-05-01 09:02:44 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-05-01 09:02:44 +0100
commitcc19203be2aab1adc4930b18e46d522005159412 (patch)
tree15d50f1af3bfa4017c47184c31aa6900e781c062 /paste.c
parent7af58172457f74c6bb8e09625a07b2ddfeea2b8a (diff)
downloadrtmux-cc19203be2aab1adc4930b18e46d522005159412.tar.gz
rtmux-cc19203be2aab1adc4930b18e46d522005159412.tar.bz2
rtmux-cc19203be2aab1adc4930b18e46d522005159412.zip
Add 'e' key in buffer mode to open the buffer in an editor.
Diffstat (limited to 'paste.c')
-rw-r--r--paste.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/paste.c b/paste.c
index c1036ad9..f1f3c9f7 100644
--- a/paste.c
+++ b/paste.c
@@ -296,6 +296,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)